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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 24 10:45:17 PDT 2016


Author: annakrat
Date: 2016-05-24 10:45:16 -0700 (Tue, 24 May 2016)
New Revision: 68504

Modified:
   grass/trunk/gui/wxpython/gui_core/widgets.py
Log:
wxGUI: show d.northarrow images in GUI

Modified: grass/trunk/gui/wxpython/gui_core/widgets.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/widgets.py	2016-05-24 17:44:18 UTC (rev 68503)
+++ grass/trunk/gui/wxpython/gui_core/widgets.py	2016-05-24 17:45:16 UTC (rev 68504)
@@ -1595,12 +1595,15 @@
 
     def _getPath(self, name):
         path = os.path.join(os.getenv("GISBASE"), "gui", "images",
-                            'symbols', 'n_arrows')
+                            'symbols')
         try:
             int(name[0])
-            return os.path.join(path, 'n_arrow{name}.png'.format(name=name))
+            return os.path.join(path, 'n_arrows', 'n_arrow{name}.png'.format(name=name))
         except ValueError:
-            return os.path.join(path, '{name}.png'.format(name=name))
+            if os.path.exists(os.path.join(path, 'n_arrows', '{name}.png'.format(name=name))):
+                return os.path.join(path, 'n_arrows', '{name}.png'.format(name=name))
+            else:
+                return os.path.join(path, 'basic', '{name}.png'.format(name=name))
 
     def OnMeasureItem(self, item):
         return 32



More information about the grass-commit mailing list