SVGHMI: Fix warning with WxPython > 4.x
authorEdouard Tisserant <edouard@beremiz.fr>
Tue, 20 Feb 2024 11:34:28 +0100
changeset 3891 0f375805097a
parent 3890 6d2d37975c7c
child 3892 1675b5533e9e
SVGHMI: Fix warning with WxPython > 4.x
svghmi/ui.py
--- a/svghmi/ui.py	Tue Feb 20 11:32:15 2024 +0100
+++ b/svghmi/ui.py	Tue Feb 20 11:34:28 2024 +0100
@@ -81,7 +81,7 @@
 
     def OnTreeNodeSelection(self, event):
         items = self.GetSelections()
-        items_pydata = [self.GetPyData(item) for item in items]
+        items_pydata = [self.GetItemData(item) for item in items]
 
         # append new items to ordered item list
         for item_pydata in items_pydata:
@@ -488,7 +488,7 @@
         """
         global thumbnail_temp_path
         event.Skip()
-        item_pydata = self.widgetpicker.GetPyData(event.GetItem())
+        item_pydata = self.widgetpicker.GetItemData(event.GetItem())
         if item_pydata is not None:
             svgpath = item_pydata