[gimp/goat-invasion: 8/325] app: allow to opionally not implement GimpImageMapTool::map()



commit 4e822106c42cbd503bd1ab9f7e2ddbb8b1acf9d7
Author: Michael Natterer <mitch gimp org>
Date:   Tue Mar 13 23:45:38 2012 +0100

    app: allow to opionally not implement GimpImageMapTool::map()
    
    it's not needed for many tools that have no legacy implementation.

 app/tools/gimpimagemaptool.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/app/tools/gimpimagemaptool.c b/app/tools/gimpimagemaptool.c
index a443823..3087096 100644
--- a/app/tools/gimpimagemaptool.c
+++ b/app/tools/gimpimagemaptool.c
@@ -540,7 +540,8 @@ gimp_image_map_tool_map (GimpImageMapTool *tool)
   gint              off_x, off_y;
   GeglRectangle     visible;
 
-  GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool)->map (tool);
+  if (GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool)->map)
+    GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool)->map (tool);
 
   gimp_display_shell_untransform_viewport (shell, &x, &y, &w, &h);
 



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