app: when copying GimpCurve, don't overwrite points from samples

In gimp_curve_config_copy(), make sure to copy the curve type
*before* the points, so that, when changing the type from FREE to
SMOOTH, we don't overwrite the copied points with interpolated
samples.
This commit is contained in:
Ell 2020-04-14 17:50:54 +03:00
parent 05556457df
commit 56693a8393
1 changed files with 5 additions and 0 deletions

View File

@ -626,6 +626,11 @@ gimp_curve_config_copy (GimpConfig *src,
GimpCurve *src_curve = GIMP_CURVE (src);
GimpCurve *dest_curve = GIMP_CURVE (dest);
/* make sure the curve type is copied *before* the points, so that we don't
* overwrite the copied points when changing the type
*/
dest_curve->curve_type = src_curve->curve_type;
gimp_config_sync (G_OBJECT (src), G_OBJECT (dest), flags);
dest_curve->identity = src_curve->identity;