Browse Source

added mouseDoubleClickEvent for selecting/marking regions, this allows rapid clicking without the app losing track which cursor to use :)

master
Christian Voigt 1 year ago
parent
commit
83ea95d1c6
  1. 8
      sdtd_world/region_label.py

8
sdtd_world/region_label.py

@ -84,6 +84,14 @@ class RegionLabel(QLabel):
super().mousePressEvent(event)
def mouseDoubleClickEvent(self, event):
modifiers = QApplication.keyboardModifiers()
if modifiers == Qt.ControlModifier:
if event.buttons() == Qt.LeftButton:
self.parent_collection.toggle_marked(self)
super().mouseDoubleClickEvent(event)
def enterEvent(self, event) -> None:
self.is_selected = True
self.update_graphics_effect()

Loading…
Cancel
Save