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.

(cherry picked from commit 987447f18f)
This commit is contained in:
Ell
2020-04-14 17:59:32 +03:00
parent c2ee2553ce
commit 1878313511
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

@ -695,6 +695,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->linear = config->linear;
for (channel = GIMP_HISTOGRAM_VALUE;