From a7423019ba4933e58ffd8688dccc2163e3621c01 Mon Sep 17 00:00:00 2001 From: Nico Tonnhofer Date: Thu, 24 Jan 2019 23:25:55 +0100 Subject: [PATCH] configtool: use GetIndex() Still some minor differences between wxPython 3.x and 4.x --- configtool/heaterlist.py | 2 +- configtool/sensorlist.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configtool/heaterlist.py b/configtool/heaterlist.py index 555b11a..7496f3f 100644 --- a/configtool/heaterlist.py +++ b/configtool/heaterlist.py @@ -57,7 +57,7 @@ class HeaterList(wx.ListCtrl): self.setRowValidity(i, flag) def OnItemSelected(self, event): - self.currentItem = event.m_itemIndex + self.currentItem = event.GetIndex() self.parent.setItemSelected(self.currentItem) def OnItemDeselected(self, event): diff --git a/configtool/sensorlist.py b/configtool/sensorlist.py index 91f124d..212357c 100644 --- a/configtool/sensorlist.py +++ b/configtool/sensorlist.py @@ -56,7 +56,7 @@ class SensorList(wx.ListCtrl): self.setRowValidity(i, flag) def OnItemSelected(self, event): - self.currentItem = event.m_itemIndex + self.currentItem = event.GetIndex() self.parent.setItemSelected(self.currentItem) def OnItemDeselected(self, event):