Pārlūkot izejas kodu

wxGUI/g.gui.iclass: fix https://trac.osgeo.org/grass/ticket/2211 (wxPython 3 issue)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59207 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 gadi atpakaļ
vecāks
revīzija
acb17c3cb4
2 mainītis faili ar 3 papildinājumiem un 5 dzēšanām
  1. 1 0
      gui/wxpython/iclass/frame.py
  2. 2 5
      gui/wxpython/iscatt/frame.py

+ 1 - 0
gui/wxpython/iclass/frame.py

@@ -794,6 +794,7 @@ class IClassMapFrame(DoubleMapFrame):
         """!Show category management dialog"""
         if self.dialogs['classManager'] is None:
             dlg = IClassCategoryManagerDialog(self)
+            dlg.CenterOnParent()
             dlg.Show()
             self.dialogs['classManager'] = dlg
         else:

+ 2 - 5
gui/wxpython/iscatt/frame.py

@@ -400,11 +400,8 @@ class CategoryListCtrl(wx.ListCtrl,
 
     def Update(self, **kwargs):
         self.SetItemCount(len(self.cats_mgr.GetCategories()))
-        self.RefreshItems(0, len(self.cats_mgr.GetCategories()))
-
-    def InitCoreCats(self):
-        self.SetItemCount(len(self.cats_mgr.GetCategories()))
-        self.RefreshItems(0, len(self.cats_mgr.GetCategories()))
+        if len(self.cats_mgr.GetCategories()):
+            self.RefreshItems(0, len(self.cats_mgr.GetCategories()) - 1)
 
     def SetVirtualData(self, row, column, text):
         attr = self.columns[column][1]