Can close non-root sketch file editors.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta 2022-08-26 12:16:44 +02:00 committed by Akos Kitta
parent 8beade0867
commit 7c361cf2d1

View File

@ -13,7 +13,6 @@ import {
CurrentSketch, CurrentSketch,
SketchesServiceClientImpl, SketchesServiceClientImpl,
} from '../../../common/protocol/sketches-service-client-impl'; } from '../../../common/protocol/sketches-service-client-impl';
import { Sketch } from '../../contributions/contribution';
@injectable() @injectable()
export class WidgetManager extends TheiaWidgetManager { export class WidgetManager extends TheiaWidgetManager {
@ -47,7 +46,8 @@ export class WidgetManager extends TheiaWidgetManager {
...widgets: Widget[] ...widgets: Widget[]
): void { ): void {
const sketchFileUris = const sketchFileUris =
CurrentSketch.isValid(sketch) && new Set(Sketch.uris(sketch)); CurrentSketch.isValid(sketch) &&
new Set([sketch.mainFileUri, ...sketch.rootFolderFileUris]);
for (const widget of widgets) { for (const widget of widgets) {
if (widget instanceof OutputWidget) { if (widget instanceof OutputWidget) {
this.setWidgetUncloseable(widget); // TODO: https://arduino.slack.com/archives/C01698YT7S4/p1598011990133700 this.setWidgetUncloseable(widget); // TODO: https://arduino.slack.com/archives/C01698YT7S4/p1598011990133700