@@ -130,7 +130,9 @@ export class Workspace implements IWorkspace { |
130 | 130 | } |
131 | 131 |
|
132 | 132 | const windowInfo = this.windowQueue.shift(); |
133 | | - if (windowInfo) { |
| 133 | + if (windowInfo instanceof Resource) { |
| 134 | + this.openEditorWindowByResource(windowInfo); |
| 135 | + } else if (windowInfo) { |
134 | 136 | this.openEditorWindow(windowInfo.name, windowInfo.title, windowInfo.options, windowInfo.viewName); |
135 | 137 | } |
136 | 138 | } |
@@ -251,7 +253,7 @@ export class Workspace implements IWorkspace { |
251 | 253 | } |
252 | 254 |
|
253 | 255 | async openEditorWindowByResource(resource: IResource, sleep: boolean = false): Promise<void> { |
254 | | - if (this.window && !this.window?.initReady && !sleep) { |
| 256 | + if (this.window && !this.window.sleep && !this.window?.initReady && !sleep) { |
255 | 257 | this.windowQueue.push(resource); |
256 | 258 | return; |
257 | 259 | } |
@@ -292,7 +294,7 @@ export class Workspace implements IWorkspace { |
292 | 294 | } |
293 | 295 |
|
294 | 296 | async openEditorWindow(name: string, title: string, options: Object, viewName?: string, sleep?: boolean) { |
295 | | - if (this.window && !this.window?.initReady && !sleep) { |
| 297 | + if (this.window && !this.window.sleep && !this.window?.initReady && !sleep) { |
296 | 298 | this.windowQueue.push({ |
297 | 299 | name, title, options, viewName, |
298 | 300 | }); |
@@ -304,7 +306,7 @@ export class Workspace implements IWorkspace { |
304 | 306 | return; |
305 | 307 | } |
306 | 308 | this.window?.updateState(WINDOW_STATE.inactive); |
307 | | - const filterWindows = this.windows.filter(d => (d.resource?.name === name && d.resource.title == title)); |
| 309 | + const filterWindows = this.windows.filter(d => (d.resource?.name === name && d.resource.title == title) || (d.resource.id == title)); |
308 | 310 | if (filterWindows && filterWindows.length) { |
309 | 311 | this.window = filterWindows[0]; |
310 | 312 | if (!sleep && this.window.sleep) { |
@@ -320,6 +322,7 @@ export class Workspace implements IWorkspace { |
320 | 322 | resourceName: name, |
321 | 323 | title, |
322 | 324 | options, |
| 325 | + id: title?.toString(), |
323 | 326 | }, resourceType, this); |
324 | 327 | const window = new EditorWindow(resource, this, { |
325 | 328 | title, |
|