[gimp] app: restart the draw tool after moving a guide
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: restart the draw tool after moving a guide
- Date: Wed, 29 Sep 2010 22:30:42 +0000 (UTC)
commit d3e2db88bb306ba43f1455675fe0bd76ff7946e3
Author: Michael Natterer <mitch gimp org>
Date: Thu Sep 30 00:29:11 2010 +0200
app: restart the draw tool after moving a guide
so the dropped guide is highlighted. Also don't uselessly stop/start
the draw tool in each oper_update(), only do so when the display
changes.
app/tools/gimpmovetool.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/app/tools/gimpmovetool.c b/app/tools/gimpmovetool.c
index 5c8499c..550c368 100644
--- a/app/tools/gimpmovetool.c
+++ b/app/tools/gimpmovetool.c
@@ -437,6 +437,9 @@ gimp_move_tool_button_release (GimpTool *tool,
move->moving_guide = FALSE;
move->guide_position = -1;
move->guide_orientation = GIMP_ORIENTATION_UNKNOWN;
+
+ if (move->guide)
+ gimp_draw_tool_start (GIMP_DRAW_TOOL (tool), display);
}
else
{
@@ -655,12 +658,18 @@ gimp_move_tool_oper_update (GimpTool *tool,
{
GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (tool);
- if (gimp_draw_tool_is_active (draw_tool))
+ gimp_draw_tool_pause (draw_tool);
+
+ if (gimp_draw_tool_is_active (draw_tool) &&
+ draw_tool->display != display)
gimp_draw_tool_stop (draw_tool);
move->guide = guide;
- gimp_draw_tool_start (draw_tool, display);
+ if (! gimp_draw_tool_is_active (draw_tool))
+ gimp_draw_tool_start (draw_tool, display);
+
+ gimp_draw_tool_resume (draw_tool);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]