app: make sure the warp tool's canvas circle updates when its size changes

and make the undo functions static, no idea why they were not.
This commit is contained in:
Michael Natterer 2014-06-20 01:14:53 +02:00
parent 374fd6cfd6
commit 99efd9c1a5
1 changed files with 28 additions and 10 deletions

View File

@ -81,14 +81,17 @@ static void gimp_warp_tool_cursor_update (GimpTool *tool
const GimpCoords *coords, const GimpCoords *coords,
GdkModifierType state, GdkModifierType state,
GimpDisplay *display); GimpDisplay *display);
const gchar * gimp_warp_tool_get_undo_desc (GimpTool *tool, const gchar * gimp_warp_tool_get_undo_desc (GimpTool *tool,
GimpDisplay *display); GimpDisplay *display);
const gchar * gimp_warp_tool_get_redo_desc (GimpTool *tool, const gchar * gimp_warp_tool_get_redo_desc (GimpTool *tool,
GimpDisplay *display); GimpDisplay *display);
gboolean gimp_warp_tool_undo (GimpTool *tool, static gboolean gimp_warp_tool_undo (GimpTool *tool,
GimpDisplay *display); GimpDisplay *display);
gboolean gimp_warp_tool_redo (GimpTool *tool, static gboolean gimp_warp_tool_redo (GimpTool *tool,
GimpDisplay *display); GimpDisplay *display);
static void gimp_warp_tool_options_notify (GimpTool *tool,
GimpToolOptions *options,
const GParamSpec *pspec);
static void gimp_warp_tool_draw (GimpDrawTool *draw_tool); static void gimp_warp_tool_draw (GimpDrawTool *draw_tool);
@ -152,6 +155,7 @@ gimp_warp_tool_class_init (GimpWarpToolClass *klass)
tool_class->get_redo_desc = gimp_warp_tool_get_redo_desc; tool_class->get_redo_desc = gimp_warp_tool_get_redo_desc;
tool_class->undo = gimp_warp_tool_undo; tool_class->undo = gimp_warp_tool_undo;
tool_class->redo = gimp_warp_tool_redo; tool_class->redo = gimp_warp_tool_redo;
tool_class->options_notify = gimp_warp_tool_options_notify;
draw_tool_class->draw = gimp_warp_tool_draw; draw_tool_class->draw = gimp_warp_tool_draw;
} }
@ -445,7 +449,7 @@ gimp_warp_tool_get_redo_desc (GimpTool *tool,
return _("Warp Tool Stroke"); return _("Warp Tool Stroke");
} }
gboolean static gboolean
gimp_warp_tool_undo (GimpTool *tool, gimp_warp_tool_undo (GimpTool *tool,
GimpDisplay *display) GimpDisplay *display)
{ {
@ -478,7 +482,7 @@ gimp_warp_tool_undo (GimpTool *tool,
return TRUE; return TRUE;
} }
gboolean static gboolean
gimp_warp_tool_redo (GimpTool *tool, gimp_warp_tool_redo (GimpTool *tool,
GimpDisplay *display) GimpDisplay *display)
{ {
@ -500,6 +504,20 @@ gimp_warp_tool_redo (GimpTool *tool,
return TRUE; return TRUE;
} }
static void
gimp_warp_tool_options_notify (GimpTool *tool,
GimpToolOptions *options,
const GParamSpec *pspec)
{
GIMP_TOOL_CLASS (parent_class)->options_notify (tool, options, pspec);
if (! strcmp (pspec->name, "effect-size"))
{
gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
}
}
static void static void
gimp_warp_tool_draw (GimpDrawTool *draw_tool) gimp_warp_tool_draw (GimpDrawTool *draw_tool)
{ {