mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-22 20:41:43 +00:00
app: initialize GimpToolPreset's tool options from the user context
so that if deserializing wants to set an unknown brush, pattern etc., the previously set default value will be used instead.
This commit is contained in:
parent
64b9ac3f6c
commit
b458b1b5c0
|
@ -175,6 +175,14 @@ gimp_tool_preset_constructed (GObject *object)
|
|||
G_OBJECT_CLASS (parent_class)->constructed (object);
|
||||
|
||||
g_assert (GIMP_IS_GIMP (preset->gimp));
|
||||
|
||||
/* initialize the tool options with sane default values, so that if
|
||||
* deserializing wants to set non-existant brushe, pattern etc.,
|
||||
* the previously set default object will be used instead.
|
||||
*/
|
||||
gimp_context_copy_properties (gimp_get_user_context (preset->gimp),
|
||||
GIMP_CONTEXT (preset->tool_options),
|
||||
GIMP_CONTEXT_ALL_PROPS_MASK);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue