Explorar o código

wxGUI/dbm: select first tab if not defined

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@49459 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=13) %!d(string=hai) anos
pai
achega
b288a57f4e
Modificáronse 1 ficheiros con 5 adicións e 3 borrados
  1. 5 3
      gui/wxpython/dbmgr/manager.py

+ 5 - 3
gui/wxpython/dbmgr/manager.py

@@ -642,10 +642,12 @@ class AttributeManager(wx.Frame):
         self._createBrowsePage()
         self._createManageTablePage()
         self._createManageLayerPage()
-
+        
         if selection:
-            wx.CallAfter(self.notebook.SetSelectionByName, selection) # select browse tab
-
+            wx.CallAfter(self.notebook.SetSelectionByName, selection)
+        else:
+            wx.CallAfter(self.notebook.SetSelection, 0) # select browse tab
+        
         # buttons
         self.btnQuit   = wx.Button(parent=self.panel, id=wx.ID_EXIT)
         self.btnQuit.SetToolTipString(_("Close Attribute Table Manager"))