@@ -42,7 +42,6 @@ qx.Class.define("osparc.editor.WorkspaceEditor", {
4242 this . setWorkspace ( workspace ) ;
4343 } else {
4444 // creating
45- this . __creatingWorkspace = true ;
4645 this . getChildControl ( "cancel" ) . addListener ( "execute" , ( ) => {
4746 osparc . store . Workspaces . getInstance ( ) . deleteWorkspace ( this . getWorkspace ( ) . getWorkspaceId ( ) )
4847 this . fireEvent ( "cancel" ) ;
@@ -51,6 +50,7 @@ qx.Class.define("osparc.editor.WorkspaceEditor", {
5150 this . __createWorkspace ( )
5251 . then ( newWorkspace => {
5352 this . setWorkspace ( newWorkspace ) ;
53+ this . fireDataEvent ( "workspaceCreated" , newWorkspace )
5454 const permissionsView = new osparc . share . CollaboratorsWorkspace ( newWorkspace ) ;
5555 permissionsView . addListener ( "updateAccessRights" , ( ) => this . fireDataEvent ( "updateAccessRights" , newWorkspace . getWorkspaceId ( ) ) , this ) ;
5656 this . _addAt ( permissionsView , this . self ( ) . POS . SHARING ) ;
@@ -109,8 +109,6 @@ qx.Class.define("osparc.editor.WorkspaceEditor", {
109109 } ,
110110
111111 members : {
112- __creatingWorkspace : null ,
113-
114112 _createChildControlImpl : function ( id ) {
115113 let control ;
116114 switch ( id ) {
@@ -225,13 +223,7 @@ qx.Class.define("osparc.editor.WorkspaceEditor", {
225223 thumbnail : this . getThumbnail ( ) ,
226224 } ;
227225 osparc . store . Workspaces . getInstance ( ) . putWorkspace ( this . getWorkspace ( ) . getWorkspaceId ( ) , updateData )
228- . then ( ( ) => {
229- if ( this . __creatingWorkspace ) {
230- this . fireDataEvent ( "workspaceCreated" , this . getWorkspace ( ) )
231- } else {
232- this . fireEvent ( "workspaceUpdated" ) ;
233- }
234- } )
226+ . then ( ( ) => this . fireEvent ( "workspaceUpdated" ) )
235227 . catch ( err => {
236228 console . error ( err ) ;
237229 osparc . FlashMessenger . logAs ( err . message , "ERROR" ) ;
0 commit comments