Procházet zdrojové kódy

wxGUI: Collapse all except current (trac https://trac.osgeo.org/grass/ticket/441)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@36140 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa před 16 roky
rodič
revize
c543521c15

+ 7 - 4
gui/wxpython/gui_modules/gselect.py

@@ -242,15 +242,18 @@ class TreeCtrlComboPopup(wx.combo.ComboPopup):
                                        subkey='selection')
                 collapse = True
 
-                if sel == 0: # collapse all expect PERMANENT and current
+                if sel == 0: # collapse all except PERMANENT and current
                     if dir in ('PERMANENT', curr_mapset):
                         collapse = False
-                elif sel == 1: # collapse all expect PERMANENT
+                elif sel == 1: # collapse all except PERMANENT
                     if dir == 'PERMANENT':
                         collapse = False
-                elif sel == 2: # collapse all
+                elif sel == 2: # collapse all except current
+                    if dir == curr_mapset:
+                        collapse = False
+                elif sel == 3: # collapse all
                     pass
-                elif sel == 3: # expand all
+                elif sel == 4: # expand all
                     collapse = False
                 
                 if collapse:

+ 6 - 4
gui/wxpython/gui_modules/preferences.py

@@ -506,10 +506,12 @@ class Settings:
                 self.internalSettings[group][key] = {}
 
         # self.internalSettings['general']["mapsetPath"]['value'] = self.GetMapsetPath()
-        self.internalSettings['general']['elementListExpand']['choices'] = (_("Collapse all except PERMANENT and current"),
-                                                                            _("Collapse all except PERMANENT"),
-                                                                            _("Collapse all"),
-                                                                            _("Expand all"))
+        self.internalSettings['general']['elementListExpand']['choices'] = \
+            (_("Collapse all except PERMANENT and current"),
+             _("Collapse all except PERMANENT"),
+             _("Collapse all except current"),
+             _("Collapse all"),
+             _("Expand all"))
         self.internalSettings['atm']['leftDbClick']['choices'] = (_('Edit selected record'),
                                                                   _('Display selected'))
         self.internalSettings['advanced']['settingsFile']['choices'] = ('home',