Do not reload a project via /load if the project is already opened

Fix #785
This commit is contained in:
Julien Duponchelle committed 2016-11-14 18:45:44 +01:00
1 parent e996b825c6
commit 5166d894eb
2 files changed
+78 -20

No files matched your search

+3 -3
View File
@@ -363,9 +363,9 @@ class Controller:
topo_data.pop("type")
if topo_data["project_id"] in self._projects:
self.remove_project(self._projects[topo_data["project_id"]])
project = yield from self.add_project(path=os.path.dirname(path), status="closed", filename=os.path.basename(path), **topo_data)
project = self._projects[topo_data["project_id"]]
else:
project = yield from self.add_project(path=os.path.dirname(path), status="closed", filename=os.path.basename(path), **topo_data)
if load or project.auto_open:
yield from project.open()
return project