From fc15b1076cc637dc70456567907f457d1276fecf Mon Sep 17 00:00:00 2001 From: Tomas Zigo <50632337+tmszi@users.noreply.github.com> Date: Sat, 16 Jul 2022 18:03:14 +0200 Subject: [PATCH] wxGUI/gui_core: fix imagery create/edit group dialog deselect all maps (#2465) --- gui/wxpython/gui_core/dialogs.py | 3 ++- gui/wxpython/gui_core/wrap.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gui/wxpython/gui_core/dialogs.py b/gui/wxpython/gui_core/dialogs.py index 8e8426bcac9..dabf9e17930 100644 --- a/gui/wxpython/gui_core/dialogs.py +++ b/gui/wxpython/gui_core/dialogs.py @@ -64,6 +64,7 @@ StaticBox, StaticText, TextCtrl, + ListBox, ) @@ -870,7 +871,7 @@ def _createDialogBody(self): sizer = wx.BoxSizer(wx.HORIZONTAL) - self.gLayerBox = wx.ListBox( + self.gLayerBox = ListBox( parent=self.gListPanel, id=wx.ID_ANY, size=(-1, 150), diff --git a/gui/wxpython/gui_core/wrap.py b/gui/wxpython/gui_core/wrap.py index 427b9e512f0..674b87fac48 100644 --- a/gui/wxpython/gui_core/wrap.py +++ b/gui/wxpython/gui_core/wrap.py @@ -909,6 +909,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