7186 Protected method to handle the mouse press event. |
7186 Protected method to handle the mouse press event. |
7187 |
7187 |
7188 @param event the mouse press event |
7188 @param event the mouse press event |
7189 @type QMouseEvent |
7189 @type QMouseEvent |
7190 """ |
7190 """ |
7191 self.vm.eventFilter(self, event) |
7191 if event.button() == Qt.MouseButton.XButton1: |
7192 super().mousePressEvent(event) |
7192 self.undo() |
|
7193 event.accept() |
|
7194 elif event.button() == Qt.MouseButton.XButton2: |
|
7195 self.redo() |
|
7196 event.accept() |
|
7197 else: |
|
7198 self.vm.eventFilter(self, event) |
|
7199 super().mousePressEvent(event) |
7193 |
7200 |
7194 def mouseDoubleClickEvent(self, evt): |
7201 def mouseDoubleClickEvent(self, evt): |
7195 """ |
7202 """ |
7196 Protected method to handle mouse double click events. |
7203 Protected method to handle mouse double click events. |
7197 |
7204 |