mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
added checkbox state changes
This commit is contained in:
parent
982091d998
commit
37101a5f54
1 changed files with 7 additions and 1 deletions
|
|
@ -41,7 +41,12 @@ class LocalGeneralWidgets(QtWidgets.QWidget):
|
|||
self.username_input.setText(username)
|
||||
|
||||
if self.is_admin_input.isChecked() != is_admin:
|
||||
self.is_admin_input.setChecked(is_admin)
|
||||
# Use state as `stateChanged` is connected to callbacks
|
||||
if is_admin:
|
||||
state = QtCore.Qt.Checked
|
||||
else:
|
||||
state = QtCore.Qt.Unchecked
|
||||
self.is_admin_input.setCheckState(state)
|
||||
|
||||
self._loading_local_settings = False
|
||||
|
||||
|
|
@ -60,6 +65,7 @@ class LocalGeneralWidgets(QtWidgets.QWidget):
|
|||
dialog.exec_()
|
||||
result = dialog.result()
|
||||
if self.is_admin_input.isChecked() != result:
|
||||
# Use state as `stateChanged` is connected to callbacks
|
||||
if result:
|
||||
state = QtCore.Qt.Checked
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue