mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-13 14:26:37 +00:00
Can close non-root sketch file editors.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
parent
8beade0867
commit
7c361cf2d1
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user