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



commit 07be1dcef68743b9a733da37692d5bd4daa501f3
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]