@@ -112,19 +112,7 @@ qx.Class.define("osparc.navigation.NavigationBar", {
112112 converter : s => s ? "visible" : "excluded"
113113 } ) ;
114114
115- const savingStudyIcon = this . getChildControl ( "saving-study-icon" ) ;
116- this . bind ( "study" , savingStudyIcon , "visibility" , {
117- converter : s => {
118- if ( s ) {
119- s . addListener ( "changeSavePending" , e => {
120- const isSaving = e . getData ( ) ;
121- const uiMode = s . getUi ( ) . getMode ( ) ;
122- savingStudyIcon . setVisibility ( isSaving && [ "workbench" , "pipeline" ] . includes ( uiMode ) ? "visible" : "excluded" ) ;
123- } ) ;
124- }
125- return "excluded" ;
126- }
127- } ) ;
115+ this . getChildControl ( "saving-study-icon" ) ;
128116
129117 // center-items
130118 this . getChildControl ( "read-only-info" ) ;
@@ -222,6 +210,7 @@ qx.Class.define("osparc.navigation.NavigationBar", {
222210 label : this . tr ( "Saving..." ) ,
223211 font : "text-12" ,
224212 opacity : 0.8 ,
213+ visibility : "excluded" ,
225214 } ) ;
226215 this . getChildControl ( "left-items" ) . add ( control ) ;
227216 break ;
@@ -360,13 +349,18 @@ qx.Class.define("osparc.navigation.NavigationBar", {
360349 } ,
361350
362351 __applyStudy : function ( study ) {
352+ const savingStudyIcon = this . getChildControl ( "saving-study-icon" ) ;
363353 const readOnlyInfo = this . getChildControl ( "read-only-info" )
364354 if ( study ) {
365355 this . getChildControl ( "study-title-options" ) . setStudy ( study ) ;
356+ study . bind ( "savePending" , readOnlyInfo , "visibility" , {
357+ converter : value => value && [ "workbench" , "pipeline" ] . includes ( study . getUi ( ) . getMode ( ) ) ? "visible" : "excluded"
358+ } ) ;
366359 study . bind ( "readOnly" , readOnlyInfo , "visibility" , {
367360 converter : value => value ? "visible" : "excluded"
368361 } ) ;
369362 } else {
363+ savingStudyIcon . exclude ( ) ;
370364 readOnlyInfo . exclude ( ) ;
371365 }
372366 } ,
0 commit comments