(self, area, event)
Add or remove the clicked area from the selection

        Args:
            area (QRect): the area that is clicked
            event (QEvent): event description
Add or remove the clicked area from the selection
Add or remove the clicked area from the selection
def select_area(self, area, event):
        """
        Add or remove the clicked area from the selection

        Args:
            area (QRect): the area that is clicked
            event (QEvent): event description
        """
        if event.button() != Qt.LeftButton:
            return
        index = self.areas.index(area)
        if event.modifiers() & Qt.ControlModifier:
            self.selection ^= {index}
        else:
            self.selection = {index}
        self.update_selection()
def select_area ( self , area , event ) : if event . button ( ) != Qt . LeftButton : return index = self . areas . index ( area ) if event . modifiers ( ) & Qt . ControlModifier : self . selection ^= { index } else : self . selection = { index } self . update_selection ( )