mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
set_project will try to refresh model by it's own if project was not found
This commit is contained in:
parent
c610071700
commit
28af01c9e7
1 changed files with 8 additions and 0 deletions
|
|
@ -49,6 +49,14 @@ class ProjectBar(QtWidgets.QWidget):
|
|||
|
||||
def set_project(self, project_name):
|
||||
index = self.project_combobox.findText(project_name)
|
||||
if index < 0:
|
||||
# Try refresh combobox model
|
||||
self.project_combobox.blockSignals(True)
|
||||
self.model.refresh()
|
||||
self.project_combobox.blockSignals(False)
|
||||
|
||||
index = self.project_combobox.findText(project_name)
|
||||
|
||||
if index >= 0:
|
||||
self.project_combobox.setCurrentIndex(index)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue