Browse Source

Location and mapset lists automatically display previously selected values (if any).

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32116 15284696-431f-4ddb-bdfa-cd5b030d7da7
Michael Barton 17 years ago
parent
commit
9206607171
1 changed files with 4 additions and 2 deletions
  1. 4 2
      gui/wxpython/gis_set.py

+ 4 - 2
gui/wxpython/gis_set.py

@@ -57,7 +57,7 @@ class GRASSStartup(wx.Frame):
         
         wx.Frame.__init__(self, parent=parent, id=id, style=style)
 
-	self.panel = wx.Panel(parent=self, id=wx.ID_ANY)
+        self.panel = wx.Panel(parent=self, id=wx.ID_ANY)
 
         #
         # graphical elements
@@ -127,7 +127,7 @@ class GRASSStartup(wx.Frame):
         self.manageloc = wx.Choice(parent=self.panel, id=wx.ID_ANY,
                                    choices=[_('Rename mapset'), _('Rename location'),
                                             _('Delete mapset'), _('Delete location')])
-	self.manageloc.SetSelection(0)
+        self.manageloc.SetSelection(0)
 
         # textinputs
         self.tgisdbase = wx.TextCtrl(parent=self.panel, id=wx.ID_ANY, value="", size=(300, -1),
@@ -200,6 +200,7 @@ class GRASSStartup(wx.Frame):
             self.UpdateLocations(self.gisdbase)
             try:
                 self.lblocations.SetSelection(self.listOfLocations.index(location))
+                self.lblocations.EnsureVisible(self.listOfLocations.index(location))
             except ValueError:
                 print >> sys.stderr, _("ERROR: Location <%s> not found") % \
                     (location)
@@ -210,6 +211,7 @@ class GRASSStartup(wx.Frame):
             if mapset:
                 try:
                     self.lbmapsets.SetSelection(self.listOfMapsets.index(mapset))
+                    self.lbmapsets.EnsureVisible(self.listOfMapsets.index(mapset))
                 except ValueError:
                     self.lbmapsets.Clear()
                     print >> sys.stderr, _("ERROR: Mapset <%s> not found") % \