[gimp] gimpwarptool: start the tool if the cursor is over an image and not started somewhere else
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] gimpwarptool: start the tool if the cursor is over an image and not started somewhere else
- Date: Tue, 21 May 2013 21:45:48 +0000 (UTC)
commit e6d05c63524e458145983a7133093b8c5317f45b
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 c063c5a..27b539d 100644
--- a/app/tools/gimpwarptool.c
+++ b/app/tools/gimpwarptool.c
@@ -330,12 +330,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]