mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Publisher: Call explicitly prepared tab methods (#5044)
* call explicitly prepared tab methods * add an overlay message
This commit is contained in:
parent
f8cb017e90
commit
6607037710
1 changed files with 15 additions and 1 deletions
|
|
@ -676,7 +676,15 @@ class PublisherWindow(QtWidgets.QDialog):
|
|||
self._tabs_widget.set_current_tab(identifier)
|
||||
|
||||
def set_current_tab(self, tab):
|
||||
self._set_current_tab(tab)
|
||||
if tab == "create":
|
||||
self._go_to_create_tab()
|
||||
elif tab == "publish":
|
||||
self._go_to_publish_tab()
|
||||
elif tab == "report":
|
||||
self._go_to_report_tab()
|
||||
elif tab == "details":
|
||||
self._go_to_details_tab()
|
||||
|
||||
if not self._window_is_visible:
|
||||
self.set_tab_on_reset(tab)
|
||||
|
||||
|
|
@ -686,6 +694,12 @@ class PublisherWindow(QtWidgets.QDialog):
|
|||
def _go_to_create_tab(self):
|
||||
if self._create_tab.isEnabled():
|
||||
self._set_current_tab("create")
|
||||
return
|
||||
|
||||
self._overlay_object.add_message(
|
||||
"Can't switch to Create tab because publishing is paused.",
|
||||
message_type="info"
|
||||
)
|
||||
|
||||
def _go_to_publish_tab(self):
|
||||
self._set_current_tab("publish")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue