Browse Source

clicking a selected region will now deselect it

master
Christian Voigt 1 year ago
parent
commit
42818874cf
  1. 11
      sdtd_world/region_label_collection.py

11
sdtd_world/region_label_collection.py

@ -23,11 +23,16 @@ class RegionLabelCollection(QGridLayout):
def set_selected(self, region_label=None):
for index, label in self.label_collection.items():
label.is_selected = False
label.update_graphics_effect()
if region_label is not label:
label.is_selected = False
label.update_graphics_effect()
if region_label is not None:
region_label.is_selected = True
if region_label.is_selected is True:
self.set_selected()
else:
region_label.is_selected = True
region_label.update_graphics_effect()
def toggle_marked(self, region_label=None):

Loading…
Cancel
Save