mirror of https://github.com/GNOME/gimp.git
app: tool control cleanup in GimpCageTool
Don't call tool_control functions twice in init(). Call activate() and halt() only on button_press() and button_release() to indicate that the tool wants motion events.
This commit is contained in:
parent
28c48b1857
commit
f585788e46
|
@ -200,10 +200,6 @@ gimp_cage_tool_init (GimpCageTool *self)
|
|||
self->coef_node = NULL;
|
||||
self->cage_node = NULL;
|
||||
self->image_map = NULL;
|
||||
|
||||
gimp_tool_control_set_wants_click (tool->control, TRUE);
|
||||
gimp_tool_control_set_tool_cursor (tool->control,
|
||||
GIMP_TOOL_CURSOR_PERSPECTIVE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -247,8 +243,6 @@ gimp_cage_tool_start (GimpCageTool *ct,
|
|||
|
||||
gimp_cage_tool_halt (ct);
|
||||
|
||||
gimp_tool_control_activate (tool->control);
|
||||
|
||||
tool->display = display;
|
||||
|
||||
if (ct->config)
|
||||
|
@ -490,6 +484,8 @@ gimp_cage_tool_button_press (GimpTool *tool,
|
|||
if (display != tool->display)
|
||||
gimp_cage_tool_start (ct, display);
|
||||
|
||||
gimp_tool_control_activate (tool->control);
|
||||
|
||||
if (ct->config)
|
||||
handle = gimp_cage_tool_is_on_handle (ct,
|
||||
draw_tool,
|
||||
|
@ -649,6 +645,8 @@ gimp_cage_tool_button_release (GimpTool *tool,
|
|||
|
||||
gimp_draw_tool_pause (GIMP_DRAW_TOOL (ct));
|
||||
|
||||
gimp_tool_control_halt (tool->control);
|
||||
|
||||
if (state & GDK_BUTTON3_MASK)
|
||||
{
|
||||
/* Cancelling */
|
||||
|
|
Loading…
Reference in New Issue