Browse Source

fix the renaming of wx.ListCtrl variables

pesekon2 5 years ago
parent
commit
7214a4a778
2 changed files with 6 additions and 4 deletions
  1. 4 2
      gui/wxpython/gmodeler/dialogs.py
  2. 2 2
      gui/wxpython/iclass/dialogs.py

+ 4 - 2
gui/wxpython/gmodeler/dialogs.py

@@ -707,10 +707,12 @@ class ModelListCtrl(ListCtrl,
 
     def OnBeginEdit(self, event):
         """Editing of item started"""
-        if self.columnNotEditable and event.m_col in self.columnNotEditable:
+        column = event.GetColumn()
+
+        if self.columnNotEditable and column in self.columnNotEditable:
             event.Veto()
             self.SetItemState(
-                event.m_itemIndex,
+                event.GetIndex(),
                 wx.LIST_STATE_SELECTED,
                 wx.LIST_STATE_SELECTED | wx.LIST_STATE_FOCUSED)
         else:

+ 2 - 2
gui/wxpython/iclass/dialogs.py

@@ -493,8 +493,8 @@ class CategoryListCtrl(wx.ListCtrl,
         return indices
 
     def OnEdit(self, event):
-        currentItem = event.m_itemIndex
-        currentCol = event.m_col
+        currentItem = event.GetIndex()
+        currentCol = event.GetColumn()
         if currentCol == 1:
             col = self.OnGetItemText(currentItem, currentCol)
             col = map(int, col.split(':'))