mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +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 qtpy import QtWidgets, QtCore, QtGui
|
||||||
|
|
||||||
from openpype.tools.ayon_utils.models import PROJECTS_MODEL_SENDER
|
from openpype.tools.ayon_utils.models import PROJECTS_MODEL_SENDER
|
||||||
|
|
@ -187,11 +189,14 @@ class ProjectsQtModel(QtGui.QStandardItemModel):
|
||||||
def _refresh_finished(self):
|
def _refresh_finished(self):
|
||||||
# TODO check if failed
|
# TODO check if failed
|
||||||
result = self._refresh_thread.get_result()
|
result = self._refresh_thread.get_result()
|
||||||
|
if result is not None:
|
||||||
self._fill_items(result)
|
self._fill_items(result)
|
||||||
|
|
||||||
self._refresh_thread = None
|
self._refresh_thread = None
|
||||||
self.refreshed.emit()
|
if result is None:
|
||||||
|
self._refresh()
|
||||||
|
else:
|
||||||
|
self.refreshed.emit()
|
||||||
|
|
||||||
def _fill_items(self, project_items):
|
def _fill_items(self, project_items):
|
||||||
new_project_names = {
|
new_project_names = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue