[gimp] Bug 768058 - Color picker tool should be able to ignore snapping
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 768058 - Color picker tool should be able to ignore snapping
- Date: Sun, 1 Jan 2017 17:00:10 +0000 (UTC)
commit 3d986425b24438a850b763c5c29d5eee2211a2f4
Author: Michael Natterer <mitch gimp org>
Date: Sun Jan 1 17:59:26 2017 +0100
Bug 768058 - Color picker tool should be able to ignore snapping
Don't snap to anything when picking colors.
app/tools/gimpcolortool.c | 7 +++++++
app/tools/gimpcolortool.h | 9 +++++----
2 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/app/tools/gimpcolortool.c b/app/tools/gimpcolortool.c
index 814a3b8..8ceeecb 100644
--- a/app/tools/gimpcolortool.c
+++ b/app/tools/gimpcolortool.c
@@ -590,6 +590,10 @@ gimp_color_tool_enable (GimpColorTool *color_tool,
color_tool->options = g_object_ref (options);
+ /* color picking doesn't snap, see bug #768058 */
+ color_tool->saved_snap_to = gimp_tool_control_get_snap_to (tool->control);
+ gimp_tool_control_set_snap_to (tool->control, FALSE);
+
color_tool->enabled = TRUE;
}
@@ -614,6 +618,9 @@ gimp_color_tool_disable (GimpColorTool *color_tool)
color_tool->options = NULL;
}
+ gimp_tool_control_set_snap_to (tool->control, color_tool->saved_snap_to);
+ color_tool->saved_snap_to = FALSE;
+
color_tool->enabled = FALSE;
}
diff --git a/app/tools/gimpcolortool.h b/app/tools/gimpcolortool.h
index 5511c10..113e23f 100644
--- a/app/tools/gimpcolortool.h
+++ b/app/tools/gimpcolortool.h
@@ -39,12 +39,13 @@ struct _GimpColorTool
GimpDrawTool parent_instance;
gboolean enabled;
- gint center_x;
- gint center_y;
- GimpColorPickMode pick_mode;
-
GimpColorOptions *options;
+ gboolean saved_snap_to;
+ GimpColorPickMode pick_mode;
+
+ gint center_x;
+ gint center_y;
GimpSamplePoint *sample_point;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]