Merge pull request #4472 from ynput/enhancement/publisher_tabs_changes

Publisher: Less confusing tab changes
This commit is contained in:
Jakub Trllo 2023-02-15 17:14:17 +01:00 committed by GitHub
commit 02a895042d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -566,24 +566,24 @@ class PublisherWindow(QtWidgets.QDialog):
def _go_to_publish_tab(self):
self._set_current_tab("publish")
def _go_to_details_tab(self):
self._set_current_tab("details")
def _go_to_report_tab(self):
self._set_current_tab("report")
def _go_to_details_tab(self):
self._set_current_tab("details")
def _is_on_create_tab(self):
return self._is_current_tab("create")
def _is_on_publish_tab(self):
return self._is_current_tab("publish")
def _is_on_details_tab(self):
return self._is_current_tab("details")
def _is_on_report_tab(self):
return self._is_current_tab("report")
def _is_on_details_tab(self):
return self._is_current_tab("details")
def _set_publish_overlay_visibility(self, visible):
if visible:
widget = self._publish_overlay
@ -647,16 +647,10 @@ class PublisherWindow(QtWidgets.QDialog):
# otherwise 'create' is used
# - this happens only on first show
if first_reset:
if self._overview_widget.has_items():
self._go_to_publish_tab()
else:
self._go_to_create_tab()
self._go_to_create_tab()
elif (
not self._is_on_create_tab()
and not self._is_on_publish_tab()
):
# If current tab is not 'Create' or 'Publish' go to 'Publish'
elif self._is_on_report_tab():
# Go to 'Publish' tab if is on 'Details' tab
# - this can happen when publishing started and was reset
# at that moment it doesn't make sense to stay at publish
# specific tabs.