Commit 701bc8f7 authored by Michael Natterer's avatar Michael Natterer 😴

app: make gimp_context_parent_notify() more robust

Ignore notifications on properties that are not "context properties",
which is for example the parent context's "gimp" property.

A notification on "gimp" is recieved when creating the child context
before the parent context is fully constructed, for example in the
parent's constructed() implementation.
parent 3a7e20d2
......@@ -1484,11 +1484,20 @@ gimp_context_parent_notify (GimpContext *parent,
GParamSpec *pspec,
GimpContext *context)
/* copy from parent if the changed property is undefined */
if (pspec->owner_type == GIMP_TYPE_CONTEXT &&
! ((1 << pspec->param_id) & context->defined_props))
if (pspec->owner_type == GIMP_TYPE_CONTEXT)
gimp_context_copy_property (parent, context, pspec->param_id);
GimpContextPropType prop = pspec->param_id;
/* copy from parent if the changed property is undefined;
* ignore properties that are not context properties, for
* example notifications on the context's "gimp" property
if ((prop >= GIMP_CONTEXT_PROP_FIRST) &&
! ((1 << prop) & context->defined_props))
gimp_context_copy_property (parent, context, prop);
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