[GRASS-SVN] r48211 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 8 07:32:57 EDT 2011


Author: martinl
Date: 2011-09-08 04:32:57 -0700 (Thu, 08 Sep 2011)
New Revision: 48211

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/psmap_dialogs.py
Log:
cmbarton: Fix error caused by double clicking on map frame
	  (merge r48202 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/psmap_dialogs.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/psmap_dialogs.py	2011-09-08 10:34:19 UTC (rev 48210)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/psmap_dialogs.py	2011-09-08 11:32:57 UTC (rev 48211)
@@ -2788,13 +2788,13 @@
     def updateListBox(self, selected = None):
         mapList = ["%s - %s" % (item[0], item[1]) for item in self.vectorList]
         self.listbox.Set(mapList)
-        if selected is not None:
-            self.listbox.SetSelection(selected)  
-            self.listbox.EnsureVisible(selected)  
         if self.listbox.IsEmpty():
             self.enableButtons(False)
         else:
             self.enableButtons(True)
+            if selected is not None:
+                self.listbox.SetSelection(selected)  
+                self.listbox.EnsureVisible(selected)  
               
     def reposition(self):
         """!Update position in legend, used only if there is no vlegend yet"""



More information about the grass-commit mailing list