Browse Source

wxGUI/forms: use thumbnails in docs for north arrow (unify with scale bar and color tables)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@68948 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 8 years ago
parent
commit
ece6783d84
1 changed files with 3 additions and 17 deletions
  1. 3 17
      gui/wxpython/gui_core/widgets.py

+ 3 - 17
gui/wxpython/gui_core/widgets.py

@@ -1594,23 +1594,9 @@ class NArrowsComboBox(PictureComboBox):
     """ComboBox with north arrows for d.barscale."""
     """ComboBox with north arrows for d.barscale."""
 
 
     def _getPath(self, name):
     def _getPath(self, name):
-        path = os.path.join(os.getenv("GISBASE"), "gui", "images",
-                            'symbols')
-        try:
-            int(name[0])
-            return os.path.join(path, 'n_arrows', 'n_arrow{name}.png'.format(name=name))
-        except ValueError:
-            if name == 'star':
-                name = '4pt_star'
-            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))
-            elif os.path.exists(os.path.join(path, 'basic', '{name}.png'.format(name=name))):
-                return os.path.join(path, 'basic', '{name}.png'.format(name=name))
-            else:
-                return os.path.join(path, 'extra', '{name}.png'.format(name=name))
-
-    def OnMeasureItem(self, item):
-        return 32
+        return os.path.join(
+            os.getenv("GISBASE"),
+            "docs", "html", "northarrows", "%s.png" % name)
 
 
 
 
 class LayersList(GListCtrl, listmix.TextEditMixin):
 class LayersList(GListCtrl, listmix.TextEditMixin):