mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
projects model handle cases when model is refreshing
This commit is contained in:
parent
42c32f8196
commit
5a0b2f6915
1 changed files with 8 additions and 3 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import uuid
|
||||
|
||||
from qtpy import QtWidgets, QtCore, QtGui
|
||||
|
||||
from openpype.tools.ayon_utils.models import PROJECTS_MODEL_SENDER
|
||||
|
|
@ -187,11 +189,14 @@ class ProjectsQtModel(QtGui.QStandardItemModel):
|
|||
def _refresh_finished(self):
|
||||
# TODO check if failed
|
||||
result = self._refresh_thread.get_result()
|
||||
|
||||
self._fill_items(result)
|
||||
if result is not None:
|
||||
self._fill_items(result)
|
||||
|
||||
self._refresh_thread = None
|
||||
self.refreshed.emit()
|
||||
if result is None:
|
||||
self._refresh()
|
||||
else:
|
||||
self.refreshed.emit()
|
||||
|
||||
def _fill_items(self, project_items):
|
||||
new_project_names = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue