gimp r24552 - in trunk: . app/tools



Author: mitch
Date: Sun Jan  6 15:10:04 2008
New Revision: 24552
URL: http://svn.gnome.org/viewvc/gimp?rev=24552&view=rev

Log:
2008-01-06  Michael Natterer  <mitch gimp org>

	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_gegl_notify):
	toggle the image map mode only if an image map currently exists.
	Fixes crash when toggling "Use GEGL" while the tool is not active.



Modified:
   trunk/ChangeLog
   trunk/app/tools/gimpimagemaptool.c

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	(original)
+++ trunk/ChangeLog	Sun Jan  6 15:10:04 2008
@@ -1,3 +1,9 @@
+2008-01-06  Michael Natterer  <mitch gimp org>
+
+	* app/tools/gimpimagemaptool.c (gimp_image_map_tool_gegl_notify):
+	toggle the image map mode only if an image map currently exists.
+	Fixes crash when toggling "Use GEGL" while the tool is not active.
+
 2008-01-06  Sven Neumann  <sven gimp org>
 
 	* configure.in: compile a list of MIME types that GIMP can read.

Modified: trunk/app/tools/gimpimagemaptool.c
==============================================================================
--- trunk/app/tools/gimpimagemaptool.c	(original)
+++ trunk/app/tools/gimpimagemaptool.c	Sun Jan  6 15:10:04 2008
@@ -139,6 +139,7 @@
   klass->save_dialog_title = NULL;
   klass->save_button_tip   = NULL;
 
+  klass->get_operation     = NULL;
   klass->map               = NULL;
   klass->dialog            = NULL;
   klass->reset             = NULL;
@@ -159,13 +160,15 @@
                                      GIMP_DIRTY_DRAWABLE        |
                                      GIMP_DIRTY_SELECTION);
 
-  image_map_tool->drawable  = NULL;
-  image_map_tool->image_map = NULL;
-
-  image_map_tool->shell       = NULL;
-  image_map_tool->main_vbox   = NULL;
-  image_map_tool->load_button = NULL;
-  image_map_tool->save_button = NULL;
+  image_map_tool->drawable        = NULL;
+  image_map_tool->operation       = NULL;
+  image_map_tool->image_map       = NULL;
+
+  image_map_tool->shell           = NULL;
+  image_map_tool->main_vbox       = NULL;
+  image_map_tool->load_button     = NULL;
+  image_map_tool->save_button     = NULL;
+  image_map_tool->settings_dialog = NULL;
 }
 
 static void
@@ -843,11 +846,14 @@
                                  const GParamSpec *pspec,
                                  GimpImageMapTool *im_tool)
 {
-  gimp_tool_control_set_preserve (GIMP_TOOL (im_tool)->control, TRUE);
+  if (im_tool->image_map)
+    {
+      gimp_tool_control_set_preserve (GIMP_TOOL (im_tool)->control, TRUE);
 
-  gimp_image_map_tool_create_map (im_tool);
+      gimp_image_map_tool_create_map (im_tool);
 
-  gimp_tool_control_set_preserve (GIMP_TOOL (im_tool)->control, FALSE);
+      gimp_tool_control_set_preserve (GIMP_TOOL (im_tool)->control, FALSE);
 
-  gimp_image_map_tool_preview (im_tool);
+      gimp_image_map_tool_preview (im_tool);
+    }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]