Commit db9ba0c8 authored by Michael Natterer's avatar Michael Natterer 😴
Browse files

Bug 760212 - method edit-stroke fails in version 2.9

Need to keep GimpPDBContext's stroke options (which is a context too)
in sync with the PDB context itself, so setting any of the context's
properties properly affects subsquent strokes, and also avoids running
into inconsistent states like happened in this bug.
parent d5a31625
......@@ -186,6 +186,12 @@ gimp_pdb_context_constructed (GObject *object)
GIMP_CONTEXT (context),
/* keep the stroke options in sync with the context */
gimp_context_define_properties (GIMP_CONTEXT (context->stroke_options),
gimp_context_set_parent (GIMP_CONTEXT (context->stroke_options),
GIMP_CONTEXT (context));
/* preserve the traditional PDB default */
g_object_set (context->stroke_options,
......@@ -401,8 +407,6 @@ gimp_pdb_context_new (Gimp *gimp,
"name", "PDB Context",
gimp_config_sync (G_OBJECT (parent), G_OBJECT (context), 0);
if (set_parent)
gimp_context_define_properties (GIMP_CONTEXT (context),
......@@ -437,6 +441,12 @@ gimp_pdb_context_new (Gimp *gimp,
/* copy the context properties last, they might have been
* overwritten by the above copying of stroke options, which have
* the pdb context as parent
gimp_config_sync (G_OBJECT (parent), G_OBJECT (context), 0);
return GIMP_CONTEXT (context);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment