From f12cc4f311fae6503f11aaa886ea883f4d0566a8 Mon Sep 17 00:00:00 2001 From: Ondrej Pesek Date: Sat, 7 Dec 2024 20:05:15 +0100 Subject: [PATCH] fix toUnselect could be undefined --- gui/wxpython/gmodeler/canvas.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gui/wxpython/gmodeler/canvas.py b/gui/wxpython/gmodeler/canvas.py index 99cedd034e5..c9583992082 100644 --- a/gui/wxpython/gmodeler/canvas.py +++ b/gui/wxpython/gmodeler/canvas.py @@ -443,6 +443,8 @@ def _onSelectShape(self, shape, append=False): if not append: toUnselect = [s for s in shapeList if s.Selected()] + else: + toUnselect = [] shape.Select(True, dc)