Bug 731279 - Tool Preset Editor not working correctly
This fixes restoring of brush properties (size, spacing angle etc.) from presets, which was utterly broken before. The fix consists of two parts: - In tool_manager_preset_changed(), always copy the brush properties again after setting the preview on the tool options, in order to override brush properites that get copied from a linked brush when that brush gets set on the tool options. But no amount of copying stuff again and again would help without: - In gimp_context_set_by_type(), don't use g_object_set() to set the object (brush, pattern etc.). Instead, build a GValue and call gimp_context_set_property(). This may seem odd, but avoids a g_object_freeze_notify()/thaw_notify() around the g_object_set(), which was causing "notify" to be emitted at the very end, after everything this context change has triggered. GimpContext is an essential core object and there is an expectation of a reasonable order of signal emissions and callbacks being called. The "notify" at the end was keeping any callbacks of the context's "foo-changed" signals to override anything an earlier callback had done, if a "notify" callback was overriding that overriding again. This was probably the reason for a lot of odd behavior observed over the years. In fact, I have been searching for this for at least 5 years.
parent
cecdbb77
Please register or sign in to comment