[gimp] Bug 759939 - Ghost brush outline in FG Select tool
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 759939 - Ghost brush outline in FG Select tool
- Date: Tue, 29 Dec 2015 11:58:05 +0000 (UTC)
commit e415b1cfabdaafffd05863744acb646caf5a678f
Author: Michael Natterer <mitch gimp org>
Date: Tue Dec 29 12:57:17 2015 +0100
Bug 759939 - Ghost brush outline in FG Select tool
Undraw the outline when the pointer leaves the canvas.
app/tools/gimpforegroundselecttool.c | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
---
diff --git a/app/tools/gimpforegroundselecttool.c b/app/tools/gimpforegroundselecttool.c
index 317039f..e7b1fc4 100644
--- a/app/tools/gimpforegroundselecttool.c
+++ b/app/tools/gimpforegroundselecttool.c
@@ -59,6 +59,9 @@
#include "gimp-intl.h"
+#define FAR_OUTSIDE -10000
+
+
typedef struct _StrokeUndo StrokeUndo;
struct _StrokeUndo
@@ -598,7 +601,15 @@ gimp_foreground_select_tool_oper_update (GimpTool *tool,
gimp_draw_tool_pause (draw_tool);
- fg_select->last_coords = *coords;
+ if (proximity)
+ {
+ fg_select->last_coords = *coords;
+ }
+ else
+ {
+ fg_select->last_coords.x = FAR_OUTSIDE;
+ fg_select->last_coords.y = FAR_OUTSIDE;
+ }
gimp_draw_tool_resume (draw_tool);
@@ -864,10 +875,11 @@ gimp_foreground_select_tool_draw (GimpDrawTool *draw_tool)
}
}
- gimp_draw_tool_add_arc (draw_tool, FALSE,
- x - radius, y - radius,
- 2 * radius, 2 * radius,
- 0.0, 2.0 * G_PI);
+ if (x > FAR_OUTSIDE && y > FAR_OUTSIDE)
+ gimp_draw_tool_add_arc (draw_tool, FALSE,
+ x - radius, y - radius,
+ 2 * radius, 2 * radius,
+ 0.0, 2.0 * G_PI);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]