From 57e7c490a3134bc5031fdae38e0ece9b9111db18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E4=B8=89?= <940119273@qq.com> Date: Tue, 14 Dec 2021 09:16:16 +0000 Subject: [PATCH] =?UTF-8?q?!1724=20=E4=BF=AE=E5=A4=8D:=E7=81=AF=E5=85=89?= =?UTF-8?q?=E5=8F=B3=E9=94=AE=E9=9A=90=E8=97=8F=E5=90=8E=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=EF=BC=8C=E7=81=AF=E5=85=89?= =?UTF-8?q?=E5=8A=A9=E6=89=8B=E8=8F=9C=E5=8D=95=E7=82=B9=E5=87=BB=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E4=B8=8D=E6=B6=88=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Add-on/HideSelected.ts | 6 ++++-- src/Editor/LightsMenu.tsx | 14 +------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/Add-on/HideSelected.ts b/src/Add-on/HideSelected.ts index ca1446273..d30947d92 100644 --- a/src/Add-on/HideSelected.ts +++ b/src/Add-on/HideSelected.ts @@ -45,8 +45,10 @@ export class Command_ShowAll implements Command app.LayoutTool.ShowViewportEntitys(); return; } - - for (let en of app.LayoutTool.CurrentSpace.Entitys) + let ents = app.LayoutTool.CurrentSpace.Entitys; + if (!app.Viewer.isLayout) + ents = ents.concat(app.Database.Lights.Entitys); + for (let en of ents) { if (!en.IsErase)//图形没有被删除才应该显示 en.Visible = true; diff --git a/src/Editor/LightsMenu.tsx b/src/Editor/LightsMenu.tsx index 3840b2700..860a84b62 100644 --- a/src/Editor/LightsMenu.tsx +++ b/src/Editor/LightsMenu.tsx @@ -1,6 +1,5 @@ import { Button, Menu, MenuItem, Popover } from "@blueprintjs/core"; -import { observable } from "mobx"; import { observer } from "mobx-react"; import * as React from "react"; import { app } from "../ApplicationServices/Application"; @@ -16,21 +15,16 @@ import { userConfig } from "./UserConfig"; @observer export class LightsMenu extends React.Component<{ GetLightType: (ent: Entity) => string; }> { - @observable isOpenMenu = false; - render() { return (