[gimp] app: draw the perspective clone handles only when they can be used
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: draw the perspective clone handles only when they can be used
- Date: Sun, 27 Mar 2011 23:27:19 +0000 (UTC)
commit 9f6b60c29d4ca25782f9bb981d5ef08127299dfc
Author: Michael Natterer <mitch gimp org>
Date: Mon Mar 28 01:27:02 2011 +0200
app: draw the perspective clone handles only when they can be used
app/tools/gimpperspectiveclonetool.c | 57 +++++++++++++++++++---------------
1 files changed, 32 insertions(+), 25 deletions(-)
---
diff --git a/app/tools/gimpperspectiveclonetool.c b/app/tools/gimpperspectiveclonetool.c
index 1567833..0e34af3 100644
--- a/app/tools/gimpperspectiveclonetool.c
+++ b/app/tools/gimpperspectiveclonetool.c
@@ -733,31 +733,34 @@ gimp_perspective_clone_tool_draw (GimpDrawTool *draw_tool)
gimp_draw_tool_pop_group (draw_tool);
- /* draw the tool handles */
- gimp_draw_tool_add_handle (draw_tool,
- GIMP_HANDLE_SQUARE,
- clone_tool->tx1, clone_tool->ty1,
- GIMP_TOOL_HANDLE_SIZE_LARGE,
- GIMP_TOOL_HANDLE_SIZE_LARGE,
- GIMP_HANDLE_ANCHOR_CENTER);
- gimp_draw_tool_add_handle (draw_tool,
- GIMP_HANDLE_SQUARE,
- clone_tool->tx2, clone_tool->ty2,
- GIMP_TOOL_HANDLE_SIZE_LARGE,
- GIMP_TOOL_HANDLE_SIZE_LARGE,
- GIMP_HANDLE_ANCHOR_CENTER);
- gimp_draw_tool_add_handle (draw_tool,
- GIMP_HANDLE_SQUARE,
- clone_tool->tx3, clone_tool->ty3,
- GIMP_TOOL_HANDLE_SIZE_LARGE,
- GIMP_TOOL_HANDLE_SIZE_LARGE,
- GIMP_HANDLE_ANCHOR_CENTER);
- gimp_draw_tool_add_handle (draw_tool,
- GIMP_HANDLE_SQUARE,
- clone_tool->tx4, clone_tool->ty4,
- GIMP_TOOL_HANDLE_SIZE_LARGE,
- GIMP_TOOL_HANDLE_SIZE_LARGE,
- GIMP_HANDLE_ANCHOR_CENTER);
+ /* draw the tool handles only when they can be used */
+ if (options->clone_mode == GIMP_PERSPECTIVE_CLONE_MODE_ADJUST)
+ {
+ gimp_draw_tool_add_handle (draw_tool,
+ GIMP_HANDLE_SQUARE,
+ clone_tool->tx1, clone_tool->ty1,
+ GIMP_TOOL_HANDLE_SIZE_LARGE,
+ GIMP_TOOL_HANDLE_SIZE_LARGE,
+ GIMP_HANDLE_ANCHOR_CENTER);
+ gimp_draw_tool_add_handle (draw_tool,
+ GIMP_HANDLE_SQUARE,
+ clone_tool->tx2, clone_tool->ty2,
+ GIMP_TOOL_HANDLE_SIZE_LARGE,
+ GIMP_TOOL_HANDLE_SIZE_LARGE,
+ GIMP_HANDLE_ANCHOR_CENTER);
+ gimp_draw_tool_add_handle (draw_tool,
+ GIMP_HANDLE_SQUARE,
+ clone_tool->tx3, clone_tool->ty3,
+ GIMP_TOOL_HANDLE_SIZE_LARGE,
+ GIMP_TOOL_HANDLE_SIZE_LARGE,
+ GIMP_HANDLE_ANCHOR_CENTER);
+ gimp_draw_tool_add_handle (draw_tool,
+ GIMP_HANDLE_SQUARE,
+ clone_tool->tx4, clone_tool->ty4,
+ GIMP_TOOL_HANDLE_SIZE_LARGE,
+ GIMP_TOOL_HANDLE_SIZE_LARGE,
+ GIMP_HANDLE_ANCHOR_CENTER);
+ }
if (GIMP_CLONE_OPTIONS (options)->clone_type == GIMP_IMAGE_CLONE &&
source_core->src_drawable && clone_tool->src_display)
@@ -830,6 +833,8 @@ gimp_perspective_clone_tool_mode_notify (GimpPerspectiveCloneOptions *options,
clone = GIMP_PERSPECTIVE_CLONE (GIMP_PAINT_TOOL (clone_tool)->core);
+ gimp_draw_tool_pause (GIMP_DRAW_TOOL (clone_tool));
+
if (options->clone_mode == GIMP_PERSPECTIVE_CLONE_MODE_PAINT)
{
/* GimpPaintTool's notify callback will set the right precision */
@@ -852,6 +857,8 @@ gimp_perspective_clone_tool_mode_notify (GimpPerspectiveCloneOptions *options,
if (tool->display)
gimp_draw_tool_start (GIMP_DRAW_TOOL (clone_tool), tool->display);
}
+
+ gimp_draw_tool_resume (GIMP_DRAW_TOOL (clone_tool));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]