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



commit fae7bc452a9a23e2c3860f3f62da841ecb0090b2
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 89caff0..15d8524 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]