[gimp/soc-2011-warp: 12/72] gimpwarptool: start the tool if the cursor is over an image and not started somewhere else
- From: Michael Murà <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2011-warp: 12/72] gimpwarptool: start the tool if the cursor is over an image and not started somewhere else
- Date: Sun, 4 Sep 2011 09:30:23 +0000 (UTC)
commit 64f1933684804e871031a3c7554b34367305226e
Author: Michael Murà <batolettre gmail com>
Date: Fri Jun 3 23:53:39 2011 +0200
gimpwarptool: start the tool if the cursor is over an image and not started somewhere else
app/tools/gimpwarptool.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/app/tools/gimpwarptool.c b/app/tools/gimpwarptool.c
index 8078229..f53c356 100644
--- a/app/tools/gimpwarptool.c
+++ b/app/tools/gimpwarptool.c
@@ -332,12 +332,22 @@ gimp_warp_tool_oper_update (GimpTool *tool,
GimpWarpTool *wt = GIMP_WARP_TOOL (tool);
GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (tool);
- gimp_draw_tool_pause (draw_tool);
+ if (!gimp_draw_tool_is_active (draw_tool))
+ {
+ gimp_warp_tool_start (wt, display);
+ }
+ else
+ {
+ if (display == tool->display)
+ {
+ gimp_draw_tool_pause (draw_tool);
- wt->cursor_x = coords->x;
- wt->cursor_y = coords->y;
+ wt->cursor_x = coords->x;
+ wt->cursor_y = coords->y;
- gimp_draw_tool_resume (draw_tool);
+ gimp_draw_tool_resume (draw_tool);
+ }
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]