mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
enhancement/AY-1456_double_click_at_instance_switch_to_publish_tab
This commit is contained in:
parent
de241369ff
commit
ab1b49b988
3 changed files with 27 additions and 0 deletions
|
|
@ -534,6 +534,8 @@ class InstanceCardView(AbstractInstanceView):
|
|||
Wrapper of all widgets in card view.
|
||||
"""
|
||||
|
||||
double_clicked = QtCore.Signal()
|
||||
|
||||
def __init__(self, controller, parent):
|
||||
super(InstanceCardView, self).__init__(parent)
|
||||
|
||||
|
|
@ -578,6 +580,9 @@ class InstanceCardView(AbstractInstanceView):
|
|||
self.sizePolicy().verticalPolicy()
|
||||
)
|
||||
|
||||
def mouseDoubleClickEvent(self, event):
|
||||
self.double_clicked.emit()
|
||||
|
||||
def sizeHint(self):
|
||||
"""Modify sizeHint based on visibility of scroll bars."""
|
||||
# Calculate width hint by content widget and vertical scroll bar
|
||||
|
|
@ -715,6 +720,7 @@ class InstanceCardView(AbstractInstanceView):
|
|||
)
|
||||
group_widget.active_changed.connect(self._on_active_changed)
|
||||
group_widget.selected.connect(self._on_widget_selection)
|
||||
# group_widget.double_clicked.connect(self._on_widget_double_clicked)
|
||||
self._content_layout.insertWidget(widget_idx, group_widget)
|
||||
self._widgets_by_group[group_name] = group_widget
|
||||
|
||||
|
|
@ -825,6 +831,11 @@ class InstanceCardView(AbstractInstanceView):
|
|||
|
||||
self.selection_changed.emit()
|
||||
|
||||
# def _on_widget_double_clicked(self):
|
||||
# print("_on_widget_double_clicked")
|
||||
# widgets = self._get_selected_widgets()
|
||||
# print(widgets)
|
||||
|
||||
def _select_item_clear(self, instance_id, group_name, new_widget):
|
||||
"""Select specific item by instance id and clear previous selection.
|
||||
|
||||
|
|
|
|||
|
|
@ -425,6 +425,9 @@ class InstanceListView(AbstractInstanceView):
|
|||
|
||||
This is public access to and from list view.
|
||||
"""
|
||||
|
||||
double_clicked = QtCore.Signal()
|
||||
|
||||
def __init__(self, controller, parent):
|
||||
super(InstanceListView, self).__init__(parent)
|
||||
|
||||
|
|
@ -474,6 +477,9 @@ class InstanceListView(AbstractInstanceView):
|
|||
|
||||
self._active_toggle_enabled = True
|
||||
|
||||
def mouseDoubleClickEvent(self, event):
|
||||
self.double_clicked.emit()
|
||||
|
||||
def _on_expand(self, index):
|
||||
self._update_widget_expand_state(index, True)
|
||||
|
||||
|
|
|
|||
|
|
@ -113,9 +113,15 @@ class OverviewWidget(QtWidgets.QFrame):
|
|||
product_list_view.selection_changed.connect(
|
||||
self._on_product_change
|
||||
)
|
||||
product_list_view.double_clicked.connect(
|
||||
self._on_double_clicked
|
||||
)
|
||||
product_view_cards.selection_changed.connect(
|
||||
self._on_product_change
|
||||
)
|
||||
product_view_cards.double_clicked.connect(
|
||||
self._on_double_clicked
|
||||
)
|
||||
# Active instances changed
|
||||
product_list_view.active_changed.connect(
|
||||
self._on_active_changed
|
||||
|
|
@ -293,6 +299,10 @@ class OverviewWidget(QtWidgets.QFrame):
|
|||
instances, context_selected, convertor_identifiers
|
||||
)
|
||||
|
||||
def _on_double_clicked(self):
|
||||
from ayon_core.tools.utils import host_tools
|
||||
host_tools.show_publisher(tab="publish")
|
||||
|
||||
def _on_active_changed(self):
|
||||
if self._refreshing_instances:
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue