Fix use of deprecated MenuItem.GetText().

Replaced by MenuItem.GetItemLabelText()
This commit is contained in:
Sylvain Tricot 2021-02-22 19:02:31 +01:00
parent 5d4e68a1a6
commit a62f78f2a7
1 changed files with 1 additions and 2 deletions

View File

@ -1261,7 +1261,7 @@ class _DataWindow(wx.Frame):
def on_menu_dataset(self, event):
menu_id = event.GetId()
dset_name = self.GetMenuBar().FindItemById(menu_id).GetText()
dset_name = self.GetMenuBar().FindItemById(menu_id).GetItemLabelText()
self.show_dataset(dset_name)
@ -1400,7 +1400,6 @@ class _DataWindow(wx.Frame):
menu = self.GetMenuBar().GetMenu(menu_id)
for item in menu.GetMenuItems():
if item.IsChecked():
#sb.SetStatusText("%s" % item.GetText(), 1)
sb.SetStatusText("%s" % item.GetItemLabelText(), 1)
break