[gimp] app: call gimp_color_tool_disable() when an old op's options_table dies
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: call gimp_color_tool_disable() when an old op's options_table dies
- Date: Fri, 31 May 2013 00:53:07 +0000 (UTC)
commit 822057a4ffbb23c40f022741f9d3fe3079f4c281
Author: Michael Natterer <mitch gimp org>
Date: Fri May 31 02:50:17 2013 +0200
app: call gimp_color_tool_disable() when an old op's options_table dies
so gimp_image_map_tool_color_picked() isn't called any longer on clicks.
Add a warning there in case it happens anyway because this is always a
programming error.
app/tools/gimpimagemaptool.c | 2 ++
app/tools/gimpoperationtool.c | 6 +++++-
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/app/tools/gimpimagemaptool.c b/app/tools/gimpimagemaptool.c
index 673c8a9..9a5538b 100644
--- a/app/tools/gimpimagemaptool.c
+++ b/app/tools/gimpimagemaptool.c
@@ -581,6 +581,8 @@ gimp_image_map_tool_color_picked (GimpColorTool *color_tool,
GimpImageMapTool *tool = GIMP_IMAGE_MAP_TOOL (color_tool);
gpointer identifier;
+ g_return_if_fail (GTK_IS_WIDGET (tool->active_picker));
+
identifier = g_object_get_data (G_OBJECT (tool->active_picker),
"picker-identifier");
diff --git a/app/tools/gimpoperationtool.c b/app/tools/gimpoperationtool.c
index dacaa34..2a70cc7 100644
--- a/app/tools/gimpoperationtool.c
+++ b/app/tools/gimpoperationtool.c
@@ -396,7 +396,11 @@ gimp_operation_tool_set_operation (GimpOperationTool *tool,
gtk_widget_destroy (tool->options_table);
tool->options_table = NULL;
- GIMP_IMAGE_MAP_TOOL (tool)->active_picker = NULL;
+ if (GIMP_IMAGE_MAP_TOOL (tool)->active_picker)
+ {
+ GIMP_IMAGE_MAP_TOOL (tool)->active_picker = NULL;
+ gimp_color_tool_disable (GIMP_COLOR_TOOL (tool));
+ }
}
if (tool->config)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]