mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 13:52:15 +01:00
added base of strictness validation
This commit is contained in:
parent
baa0f543df
commit
9552b41bc4
1 changed files with 13 additions and 0 deletions
|
|
@ -137,6 +137,10 @@ class ContextDialog(QtWidgets.QDialog):
|
|||
"task": None
|
||||
}
|
||||
|
||||
def set_strict(self, strict):
|
||||
self._strict = strict
|
||||
self._validate_strict()
|
||||
|
||||
def _on_asset_refresh_timer(self):
|
||||
self._assets_widget.refresh()
|
||||
|
||||
|
|
@ -158,6 +162,15 @@ class ContextDialog(QtWidgets.QDialog):
|
|||
self.accept()
|
||||
|
||||
|
||||
def _validate_strict(self):
|
||||
if not self._strict:
|
||||
if not self._ok_btn.isEnabled():
|
||||
self._ok_btn.setEnabled(True)
|
||||
return
|
||||
|
||||
enabled = True
|
||||
self._ok_btn.setEnabled(enabled)
|
||||
|
||||
def set_context(self, project_name=None, asset_name=None):
|
||||
if project_name is None:
|
||||
asset_name = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue