[GRASS-SVN] r48202 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 8 03:13:02 EDT 2011


Author: cmbarton
Date: 2011-09-08 00:13:02 -0700 (Thu, 08 Sep 2011)
New Revision: 48202

Modified:
   grass/trunk/gui/wxpython/gui_modules/psmap_dialogs.py
Log:
Fix error caused by double clicking on map frame

Modified: grass/trunk/gui/wxpython/gui_modules/psmap_dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/psmap_dialogs.py	2011-09-08 06:47:18 UTC (rev 48201)
+++ grass/trunk/gui/wxpython/gui_modules/psmap_dialogs.py	2011-09-08 07:13:02 UTC (rev 48202)
@@ -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