[gimp] app: gimp_paint_tool_oper_update(): stop/start the draw tool only when needed
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: gimp_paint_tool_oper_update(): stop/start the draw tool only when needed
- Date: Mon, 11 Oct 2010 20:27:20 +0000 (UTC)
commit 38153d7476f7c9388766a386d5394c27998d3027
Author: Michael Natterer <mitch gimp org>
Date: Mon Oct 11 22:26:52 2010 +0200
app: gimp_paint_tool_oper_update(): stop/start the draw tool only when needed
app/tools/gimppainttool.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/app/tools/gimppainttool.c b/app/tools/gimppainttool.c
index 81c4db9..3e8f51c 100644
--- a/app/tools/gimppainttool.c
+++ b/app/tools/gimppainttool.c
@@ -588,7 +588,10 @@ gimp_paint_tool_oper_update (GimpTool *tool,
return;
}
- 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);
gimp_tool_pop_status (tool, display);
@@ -698,11 +701,18 @@ gimp_paint_tool_oper_update (GimpTool *tool,
paint_tool->draw_line = FALSE;
}
- gimp_draw_tool_start (draw_tool, display);
+ if (! gimp_draw_tool_is_active (draw_tool))
+ gimp_draw_tool_start (draw_tool, display);
+ }
+ else if (gimp_draw_tool_is_active (draw_tool))
+ {
+ gimp_draw_tool_stop (draw_tool);
}
GIMP_TOOL_CLASS (parent_class)->oper_update (tool, coords, state, proximity,
display);
+
+ gimp_draw_tool_resume (draw_tool);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]