File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
services/static-webserver/client/source/class/osparc/desktop Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments