mirror of https://github.com/GNOME/gimp.git
app: "Reset to default values" does not properly reset aspect ratio.
Generated brushes can have specific aspect ratio, hence resetting to fixed property defaults may be wrong. Therefore GimpPaintOptions needs to redefine the reset() method from GimpConfigInterface. Note: the specific "Reset aspect ratio to brush's native aspect ratio" button was alright. But the broader "Reset to default values" was not.
This commit is contained in:
parent
e83b136108
commit
129a0e4bcd
|
@ -148,6 +148,7 @@ static GimpConfig * gimp_paint_options_duplicate (GimpConfig *config);
|
||||||
static gboolean gimp_paint_options_copy (GimpConfig *src,
|
static gboolean gimp_paint_options_copy (GimpConfig *src,
|
||||||
GimpConfig *dest,
|
GimpConfig *dest,
|
||||||
GParamFlags flags);
|
GParamFlags flags);
|
||||||
|
static void gimp_paint_options_reset (GimpConfig *config);
|
||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GimpPaintOptions, gimp_paint_options,
|
G_DEFINE_TYPE_WITH_CODE (GimpPaintOptions, gimp_paint_options,
|
||||||
|
@ -425,6 +426,7 @@ gimp_paint_options_config_iface_init (GimpConfigInterface *config_iface)
|
||||||
|
|
||||||
config_iface->duplicate = gimp_paint_options_duplicate;
|
config_iface->duplicate = gimp_paint_options_duplicate;
|
||||||
config_iface->copy = gimp_paint_options_copy;
|
config_iface->copy = gimp_paint_options_copy;
|
||||||
|
config_iface->reset = gimp_paint_options_reset;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -799,6 +801,18 @@ gimp_paint_options_copy (GimpConfig *src,
|
||||||
return parent_config_iface->copy (src, dest, flags);
|
return parent_config_iface->copy (src, dest, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_paint_options_reset (GimpConfig *config)
|
||||||
|
{
|
||||||
|
GimpBrush *brush = gimp_context_get_brush (GIMP_CONTEXT (config));
|
||||||
|
|
||||||
|
parent_config_iface->reset (config);
|
||||||
|
|
||||||
|
if (brush)
|
||||||
|
gimp_paint_options_set_default_brush_aspect_ratio (GIMP_PAINT_OPTIONS (config),
|
||||||
|
brush);
|
||||||
|
}
|
||||||
|
|
||||||
GimpPaintOptions *
|
GimpPaintOptions *
|
||||||
gimp_paint_options_new (GimpPaintInfo *paint_info)
|
gimp_paint_options_new (GimpPaintInfo *paint_info)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue