File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -157,27 +157,15 @@ function activate(
157157 tracker . currentWidget !== null &&
158158 tracker . currentWidget === app . shell . currentWidget ,
159159 execute : ( ) => {
160- const wdg = app . shell . currentWidget as DrawIODocumentWidget ;
161- const name =
162- wdg . context . path
163- . split ( '/' )
164- . pop ( )
165- . split ( '.' ) [ 0 ] + '.svg' ;
166- const path = wdg . context . path
167- . split ( '/' )
168- . slice ( 0 , - 1 )
169- . join ( ) ;
170-
160+ const cwd = browserFactory . defaultBrowser . model . path ;
171161 commands
172162 . execute ( 'docmanager:new-untitled' , {
173- name,
174- path,
163+ path : cwd ,
175164 type : 'file' ,
176165 ext : '.svg'
177166 } )
178167 . then ( model => {
179- model . name = name ;
180- model . path = path ? path + '/' + name : name ;
168+ const wdg = app . shell . currentWidget as any ;
181169 model . content = wdg . getSVG ( ) ;
182170 model . format = 'text' ;
183171 app . serviceManager . contents . save ( model . path , model ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments