mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
right clicking tree view doen't switch tab
This commit is contained in:
parent
dd776b728b
commit
b8f0d590f1
2 changed files with 11 additions and 6 deletions
|
|
@ -581,7 +581,8 @@ class InstanceCardView(AbstractInstanceView):
|
|||
)
|
||||
|
||||
def mouseDoubleClickEvent(self, event):
|
||||
self.double_clicked.emit()
|
||||
if event.button() == QtCore.Qt.LeftButton:
|
||||
self.double_clicked.emit()
|
||||
|
||||
def sizeHint(self):
|
||||
"""Modify sizeHint based on visibility of scroll bars."""
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ class InstanceTreeView(QtWidgets.QTreeView):
|
|||
"double click" as 2x "single click".
|
||||
"""
|
||||
if event.button() != QtCore.Qt.LeftButton:
|
||||
return
|
||||
return False
|
||||
|
||||
pressed_group_index = None
|
||||
pos_index = self.indexAt(event.pos())
|
||||
|
|
@ -388,13 +388,17 @@ class InstanceTreeView(QtWidgets.QTreeView):
|
|||
|
||||
self._pressed_group_index = pressed_group_index
|
||||
|
||||
return True
|
||||
|
||||
def mousePressEvent(self, event):
|
||||
self._mouse_press(event)
|
||||
super(InstanceTreeView, self).mousePressEvent(event)
|
||||
handled = self._mouse_press(event)
|
||||
if handled:
|
||||
super(InstanceTreeView, self).mousePressEvent(event)
|
||||
|
||||
def mouseDoubleClickEvent(self, event):
|
||||
self._mouse_press(event)
|
||||
super(InstanceTreeView, self).mouseDoubleClickEvent(event)
|
||||
handled = self._mouse_press(event)
|
||||
if handled:
|
||||
super(InstanceTreeView, self).mouseDoubleClickEvent(event)
|
||||
|
||||
def _mouse_release(self, event, pressed_index):
|
||||
if event.button() != QtCore.Qt.LeftButton:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue