[GRASS-SVN] r57419 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 5 13:36:40 PDT 2013


Author: wenzeslaus
Date: 2013-08-05 13:36:39 -0700 (Mon, 05 Aug 2013)
New Revision: 57419

Modified:
   grass/trunk/gui/wxpython/gui_core/mapwindow.py
Log:
wxGUI/mapwindow: adding missing attribute into initialization of cursors

Modified: grass/trunk/gui/wxpython/gui_core/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/mapwindow.py	2013-08-05 19:43:48 UTC (rev 57418)
+++ grass/trunk/gui/wxpython/gui_core/mapwindow.py	2013-08-05 20:36:39 UTC (rev 57419)
@@ -148,15 +148,21 @@
             wx.EVT_MOUSE_EVENTS : []
             }
 
-        # available cursors:
+        # available cursors
         self._cursors = {
-            "default" : wx.StockCursor(wx.CURSOR_ARROW),
-            "cross"   : wx.StockCursor(wx.CURSOR_CROSS),
-            "hand"    : wx.StockCursor(wx.CURSOR_HAND),
-            "pencil"  : wx.StockCursor(wx.CURSOR_PENCIL),
+            "default": wx.StockCursor(wx.CURSOR_ARROW),
+            "cross": wx.StockCursor(wx.CURSOR_CROSS),
+            "hand": wx.StockCursor(wx.CURSOR_HAND),
+            "pencil": wx.StockCursor(wx.CURSOR_PENCIL),
             "sizenwse": wx.StockCursor(wx.CURSOR_SIZENWSE)
             }
 
+        # default cursor for window is arrow (at least we rely on it here)
+        # but we need to define attribute here
+        # cannot call SetNamedCursor since it expects the instance
+        # to be a wx window, so setting only the attribute
+        self._cursor = 'default'
+
         wx.CallAfter(self.InitBinding)
 
     def __del__(self):



More information about the grass-commit mailing list