Launcher ignore archived project

Based on avalon-core bfce450f
This commit is contained in:
David Lai 2021-09-11 17:44:01 +08:00
parent 181c1faf00
commit 394b714496
2 changed files with 1 additions and 16 deletions

View file

@ -326,8 +326,6 @@ class ProjectModel(QtGui.QStandardItemModel):
super(ProjectModel, self).__init__(parent=parent)
self.dbcon = dbcon
self.hide_invisible = False
self.project_icon = qtawesome.icon("fa.map", color="white")
self._project_names = set()
@ -380,16 +378,4 @@ class ProjectModel(QtGui.QStandardItemModel):
self.invisibleRootItem().insertRows(row, items)
def get_projects(self):
project_docs = []
for project_doc in sorted(
self.dbcon.projects(), key=lambda x: x["name"]
):
if (
self.hide_invisible
and not project_doc["data"].get("visible", True)
):
continue
project_docs.append(project_doc)
return project_docs
return sorted(self.dbcon.projects(no_archived=True), key=lambda x: x["name"])

View file

@ -271,7 +271,6 @@ class LauncherWindow(QtWidgets.QDialog):
)
project_model = ProjectModel(self.dbcon)
project_model.hide_invisible = True
project_handler = ProjectHandler(self.dbcon, project_model)
project_panel = ProjectsPanel(project_handler)