[gimp/soc-2011-warp] 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] gimpwarptool: start the tool if the cursor is over an image and not started somewhere else
- Date: Fri, 3 Jun 2011 23:31:07 +0000 (UTC)
commit 6307b5ef57dcbdba070ecc1e59077cd2ab158b5e
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]