[gimp] app: FG select: implement canceling the current stroke (right mouse button)
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: FG select: implement canceling the current stroke (right mouse button)
- Date: Wed, 16 Apr 2014 23:54:34 +0000 (UTC)
commit e1383332044ac03a2826382f6fd51ace04cecef1
Author: Michael Natterer <mitch gimp org>
Date: Thu Apr 17 01:46:32 2014 +0200
app: FG select: implement canceling the current stroke (right mouse button)
app/tools/gimpforegroundselecttool.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/app/tools/gimpforegroundselecttool.c b/app/tools/gimpforegroundselecttool.c
index c793836..e757367 100644
--- a/app/tools/gimpforegroundselecttool.c
+++ b/app/tools/gimpforegroundselecttool.c
@@ -520,12 +520,20 @@ gimp_foreground_select_tool_button_release (GimpTool *tool,
gimp_tool_control_halt (tool->control);
- gimp_foreground_select_tool_stroke_paint (fg_select, display, options);
-
- if (fg_select->state == MATTING_STATE_PREVIEW_MASK)
- gimp_foreground_select_tool_preview (fg_select, display);
+ if (release_type == GIMP_BUTTON_RELEASE_CANCEL)
+ {
+ g_array_free (fg_select->stroke, TRUE);
+ fg_select->stroke = NULL;
+ }
else
- gimp_foreground_select_tool_set_trimap (fg_select, display);
+ {
+ gimp_foreground_select_tool_stroke_paint (fg_select, display, options);
+
+ if (fg_select->state == MATTING_STATE_PREVIEW_MASK)
+ gimp_foreground_select_tool_preview (fg_select, display);
+ else
+ gimp_foreground_select_tool_set_trimap (fg_select, display);
+ }
gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]