diff --git a/gui/wxpython/gui_core/dialogs.py b/gui/wxpython/gui_core/dialogs.py index 2f298dfc740..60c6f186182 100644 --- a/gui/wxpython/gui_core/dialogs.py +++ b/gui/wxpython/gui_core/dialogs.py @@ -60,6 +60,7 @@ StaticBox, StaticText, TextCtrl, + ListBox, ) @@ -834,9 +835,12 @@ def _createDialogBody(self): sizer = wx.BoxSizer(wx.HORIZONTAL) - self.gLayerBox = wx.ListBox( - parent=self.gListPanel, id=wx.ID_ANY, size=(-1, 150), - style=wx.LB_MULTIPLE | wx.LB_NEEDED_SB) + self.gLayerBox = ListBox( + parent=self.gListPanel, + id=wx.ID_ANY, + size=(-1, 150), + style=wx.LB_MULTIPLE | wx.LB_NEEDED_SB, + ) sizer.Add(self.gLayerBox, proportion=1, flag=wx.EXPAND) self.addLayer = Button(self.gListPanel, id=wx.ID_ADD) diff --git a/gui/wxpython/gui_core/wrap.py b/gui/wxpython/gui_core/wrap.py index 7cc2282d59b..72324ee8364 100644 --- a/gui/wxpython/gui_core/wrap.py +++ b/gui/wxpython/gui_core/wrap.py @@ -762,6 +762,10 @@ def SetToolTip(self, tip): else: wx.ListBox.SetToolTipString(self, tip) + def DeselectAll(self): + for i in range(self.GetCount()): + self.Deselect(i) + class HyperlinkCtrl(HyperlinkCtrl_): """Wrapper around HyperlinkCtrl to have more control