[gimp/soc-2013-n-point-deformation-tool: 11/22] app: npd-tool: start and stop the tool more correctly
- From: Marek Dvoroznak <dvoromar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2013-n-point-deformation-tool: 11/22] app: npd-tool: start and stop the tool more correctly
- Date: Sat, 5 Oct 2013 02:18:20 +0000 (UTC)
commit 108dd20303637087153f87b3ab0922f14ad3afe6
Author: Marek Dvoroznak <dvoromar gmail com>
Date: Mon Aug 26 01:41:56 2013 +0200
app: npd-tool: start and stop the tool more correctly
Don't add a control point after the first click on the drawable,
just start the tool. Don't stop the tool if it hasn't been started.
app/tools/gimpnpointdeformationtool.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/app/tools/gimpnpointdeformationtool.c b/app/tools/gimpnpointdeformationtool.c
index 5e530a7..058f41c 100644
--- a/app/tools/gimpnpointdeformationtool.c
+++ b/app/tools/gimpnpointdeformationtool.c
@@ -203,7 +203,9 @@ gimp_n_point_deformation_tool_control (GimpTool *tool,
break;
case GIMP_TOOL_ACTION_HALT:
- gimp_n_point_deformation_tool_halt (npd_tool);
+ /* stop the tool only when it has been started */
+ if (npd_tool->active)
+ gimp_n_point_deformation_tool_halt (npd_tool);
break;
}
@@ -462,9 +464,12 @@ gimp_n_point_deformation_tool_button_press (GimpTool *tool,
if (display != tool->display)
{
+ /* this is the first click on the drawable - just start the tool */
gimp_n_point_deformation_tool_start (npd_tool, display);
+ return;
}
+ /* this is at least second click on the drawable - do usual work */
gimp_tool_control_activate (tool->control);
npd_tool->selected_cp = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]