diff --git a/gui/wxpython/gui_core/dialogs.py b/gui/wxpython/gui_core/dialogs.py index b625d340a7a..7b682c0d084 100644 --- a/gui/wxpython/gui_core/dialogs.py +++ b/gui/wxpython/gui_core/dialogs.py @@ -986,8 +986,7 @@ def OnGSelAll(self, event): if not check: self.gLayerBox.DeselectAll() else: - for item in range(self.subgListBox.GetCount()): - self.gLayerBox.Select(item) + self.gLayerBox.SelectAll() event.Skip() diff --git a/gui/wxpython/gui_core/wrap.py b/gui/wxpython/gui_core/wrap.py index 674b87fac48..325be0cf2bf 100644 --- a/gui/wxpython/gui_core/wrap.py +++ b/gui/wxpython/gui_core/wrap.py @@ -913,6 +913,10 @@ def DeselectAll(self): for i in range(self.GetCount()): self.Deselect(i) + def SelectAll(self): + for i in range(self.GetCount()): + self.Select(i) + class HyperlinkCtrl(HyperlinkCtrl_): """Wrapper around HyperlinkCtrl to have more control