mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
it is possible to set if should reset settings on show
This commit is contained in:
parent
a88ad2237d
commit
0887fcf13e
1 changed files with 3 additions and 2 deletions
|
|
@ -19,11 +19,11 @@ class MainWidget(QtWidgets.QWidget):
|
||||||
widget_width = 1000
|
widget_width = 1000
|
||||||
widget_height = 600
|
widget_height = 600
|
||||||
|
|
||||||
def __init__(self, user_role, parent=None):
|
def __init__(self, user_role, parent=None, reset_on_show=True):
|
||||||
super(MainWidget, self).__init__(parent)
|
super(MainWidget, self).__init__(parent)
|
||||||
|
|
||||||
self._user_passed = False
|
self._user_passed = False
|
||||||
self._reset_on_show = True
|
self._reset_on_show = reset_on_show
|
||||||
|
|
||||||
self._password_dialog = None
|
self._password_dialog = None
|
||||||
|
|
||||||
|
|
@ -95,6 +95,7 @@ class MainWidget(QtWidgets.QWidget):
|
||||||
def showEvent(self, event):
|
def showEvent(self, event):
|
||||||
super(MainWidget, self).showEvent(event)
|
super(MainWidget, self).showEvent(event)
|
||||||
if self._reset_on_show:
|
if self._reset_on_show:
|
||||||
|
self._reset_on_show = False
|
||||||
self.reset()
|
self.reset()
|
||||||
|
|
||||||
def _show_password_dialog(self):
|
def _show_password_dialog(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue