提交 56fc560e 编写于 作者: S SteVen Batten

reset default container location when hidden

上级 aa16d5db
......@@ -202,6 +202,15 @@ export class ViewsService extends Disposable implements IViewsService {
}
run(accessor: ServicesAccessor): void {
const viewDescriptorService = accessor.get(IViewDescriptorService);
const defaultContainer = viewDescriptorService.getDefaultContainerById(viewDescriptor.id)!;
const containerModel = viewDescriptorService.getViewContainerModel(defaultContainer)!;
// The default container is hidden so we should try to reset its location first
if (defaultContainer.hideIfEmpty && containerModel.visibleViewDescriptors.length === 0) {
const defaultLocation = viewDescriptorService.getDefaultViewContainerLocation(defaultContainer)!;
viewDescriptorService.moveViewContainerToLocation(defaultContainer, defaultLocation);
}
viewDescriptorService.moveViewsToContainer([viewDescriptor], viewDescriptorService.getDefaultContainerById(viewDescriptor.id)!);
accessor.get(IViewsService).openView(viewDescriptor.id, true);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册