app: maintain common settings when editing Brightness-Contrast/Levels as Levels/Curves

When converting Brightness-Contrast to Levels, and Levels to
Curves, make sure to copy the common settings as well as the
operation-specific settings.
This commit is contained in:
Ell 2020-04-14 17:59:32 +03:00
parent 88689515ab
commit 987447f18f
2 changed files with 8 additions and 0 deletions

View File

@ -181,6 +181,10 @@ gimp_brightness_contrast_config_to_levels_config (GimpBrightnessContrastConfig *
levels = g_object_new (GIMP_TYPE_LEVELS_CONFIG, NULL);
gimp_operation_settings_config_copy_base (GIMP_CONFIG (config),
GIMP_CONFIG (levels),
0);
brightness = config->brightness / 2.0;
slant = tan ((config->contrast + 1) * G_PI_4);

View File

@ -714,6 +714,10 @@ gimp_levels_config_to_curves_config (GimpLevelsConfig *config)
curves = g_object_new (GIMP_TYPE_CURVES_CONFIG, NULL);
gimp_operation_settings_config_copy_base (GIMP_CONFIG (config),
GIMP_CONFIG (curves),
0);
curves->trc = config->trc;
for (channel = GIMP_HISTOGRAM_VALUE;