Skip to content

Commit 4d3e3ef

Browse files
committed
minor
1 parent f71c76c commit 4d3e3ef

File tree

1 file changed

+9
-7
lines changed
  • services/static-webserver/client/source/class/osparc/desktop

1 file changed

+9
-7
lines changed

services/static-webserver/client/source/class/osparc/desktop/StudyEditor.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,6 @@ qx.Class.define("osparc.desktop.StudyEditor", {
152152
.then(studyData => {
153153
this.__setStudyDataInBackend(studyData);
154154

155-
if (osparc.utils.Utils.eventDrivenPatch()) {
156-
study.listenToChanges();
157-
study.addListener("updateStudyDocument", e => this.updateStudyDocument(e.getData()), this);
158-
}
159-
160155
this.__workbenchView.setStudy(study);
161156
this.__slideshowView.setStudy(study);
162157

@@ -251,8 +246,15 @@ qx.Class.define("osparc.desktop.StudyEditor", {
251246
this.nodeSelected(nodeId);
252247
}, this);
253248

254-
// listener already added in __applyStudy
255-
// workbench.addListener("updateStudyDocument", () => this.updateStudyDocument());
249+
250+
251+
if (osparc.utils.Utils.eventDrivenPatch()) {
252+
study.listenToChanges(); // this includes the listener on the workbench
253+
study.addListener("updateStudyDocument", e => this.updateStudyDocument(e.getData()), this);
254+
} else {
255+
workbench.addListener("updateStudyDocument", () => this.updateStudyDocument());
256+
}
257+
256258
workbench.addListener("restartAutoSaveTimer", () => this.__restartAutoSaveTimer());
257259
},
258260

0 commit comments

Comments
 (0)