app: in GimpDrawTool, update widget on tool resume

In GimpDrawTool, update the tool widget on GIMP_TOOL_ACTION_RESUME,
so that it can respond to changes in the display-shell scale/
offset.  We'd previously done that for individual tools/widgets,
but let's just do it in one place.

(cherry picked from commit c73710e410)
This commit is contained in:
Ell
2020-05-14 22:33:14 +03:00
parent c4061c01aa
commit bd00527fe5
6 changed files with 4 additions and 23 deletions

View File

@ -297,20 +297,12 @@ gimp_tool_compass_constructed (GObject *object)
{
GimpToolCompass *compass = GIMP_TOOL_COMPASS (object);
GimpToolWidget *widget = GIMP_TOOL_WIDGET (object);
GimpDisplayShell *shell = gimp_tool_widget_get_shell (widget);
GimpToolCompassPrivate *private = compass->private;
GimpCanvasGroup *stroke_group;
gint i;
G_OBJECT_CLASS (parent_class)->constructed (object);
g_signal_connect_object (shell, "scaled",
G_CALLBACK (gimp_tool_compass_changed),
compass, G_CONNECT_SWAPPED);
g_signal_connect_object (shell, "rotated",
G_CALLBACK (gimp_tool_compass_changed),
compass, G_CONNECT_SWAPPED);
stroke_group = gimp_tool_widget_add_stroke_group (widget);
gimp_tool_widget_push_group (widget, stroke_group);

View File

@ -806,10 +806,6 @@ gimp_tool_rectangle_constructed (GObject *object)
gimp_canvas_item_set_highlight (private->highlight_handles[i], TRUE);
}
g_signal_connect_object (gimp_tool_widget_get_shell (widget), "scaled",
G_CALLBACK (gimp_tool_rectangle_changed),
widget, G_CONNECT_SWAPPED);
gimp_tool_rectangle_changed (widget);
}