瀏覽代碼

Fix error caused by double clicking on map frame

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48202 15284696-431f-4ddb-bdfa-cd5b030d7da7
Michael Barton 13 年之前
父節點
當前提交
c236d83a6e
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      gui/wxpython/gui_modules/psmap_dialogs.py

+ 3 - 3
gui/wxpython/gui_modules/psmap_dialogs.py

@@ -2788,13 +2788,13 @@ class VectorPanel(wx.Panel):
     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"""