!1724 修复:灯光右键隐藏后不能显示问题,灯光助手菜单点击外部不消失问题

pull/1735/MERGE
林三 3 years ago committed by ChenX
parent b92615a1d5
commit 57e7c490a3

@ -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;

@ -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 (
<Popover
isOpen={this.isOpenMenu && userConfig.lightHelper}
modifiers={{ arrow: { enabled: false } }}
onClosed={this.Close}
disabled={!userConfig.lightHelper}
>
<Button
style={{ fontSize: "11px", textAlign: "center", minHeight: "15px", height: "15px", lineHeight: "1px" }}
text="灯光助手"
disabled={!userConfig.lightHelper}
onClick={() => { this.isOpenMenu = !this.isOpenMenu; }}
/>
{this.RenderMenu()}
</Popover >
@ -65,12 +59,6 @@ export class LightsMenu extends React.Component<{ GetLightType: (ent: Entity) =>
);
};
private Close = () =>
{
let store = DownPanelStore.GetInstance() as DownPanelStore;
store.Upload();
};
private onHook(data: LightsData, downStore: DownPanelStore)
{
if (data.mode !== LightDataModeType.A && !data.enable) //有灯光取消打勾时, "全部"取消打勾

Loading…
Cancel
Save