From 82a25243f100ab7103706364440a12084756d55b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=AD=90=E6=B6=B5?= <2067519648@qq.com> Date: Fri, 21 Jun 2024 10:51:02 +0000 Subject: [PATCH] =?UTF-8?q?!2833=20=E4=BF=AE=E5=A4=8D:=20=E8=A7=86?= =?UTF-8?q?=E5=8F=A3=E5=86=BB=E7=BB=93=E7=9A=84UI=E6=9B=B4=E6=96=B0(?= =?UTF-8?q?=E7=BB=99=E5=9B=BE=E5=B1=82=E5=8A=A0=E4=B8=AA=E8=A1=A5=E4=B8=81?= =?UTF-8?q?)=20Merge=20pull=20request=20!2833=20from=20=E5=BC=A0=E5=AD=90?= =?UTF-8?q?=E6=B6=B5/fix=5Flayer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Editor/DbClick/DbClick.ts | 1 + src/Reactor/LayerReactor.ts | 10 +++++++++- src/UI/Components/ToolBar/Layer/LayerManager.tsx | 4 ---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Editor/DbClick/DbClick.ts b/src/Editor/DbClick/DbClick.ts index 7c0ebaa2d..d28724c42 100644 --- a/src/Editor/DbClick/DbClick.ts +++ b/src/Editor/DbClick/DbClick.ts @@ -291,6 +291,7 @@ export class DbClickManager extends Singleton app.Viewer.CurrentViewport.ViewportMaterial.opacity = 1; app.Viewer.CurrentViewport.NeedUpdateTexture = true; app.Viewer.CurrentViewport = null; + UpdateLayerByNoViewPoint(); } app.Editor.SelectCtrl.Cancel(); app.Viewer.Scene.add(app.Viewer.GripScene); diff --git a/src/Reactor/LayerReactor.ts b/src/Reactor/LayerReactor.ts index 23ab70bc0..8bdf4fe6e 100644 --- a/src/Reactor/LayerReactor.ts +++ b/src/Reactor/LayerReactor.ts @@ -4,6 +4,8 @@ import { CommandNames } from "../Common/CommandNames"; import { CommandHistoryRecord } from "../DatabaseServices/CommandHistoryRecord"; import { LayerTableRecord } from "../DatabaseServices/LayerTableRecord"; import { LayerTable } from "../DatabaseServices/Tables/LayerTable"; +import { ViewportEntity } from "../DatabaseServices/ViewportEntity"; +import { UpdateLayerByViewPoint } from "../UI/Components/ToolBar/Layer/LayerCMD"; import { LayerTopStore } from "../UI/Components/ToolBar/Layer/LayerPanel"; import { LayerStore } from "../UI/Components/ToolBar/Layer/State/Store"; import { DataToViewForLayer } from "../UI/Components/ToolBar/Layer/State/Transform"; @@ -20,15 +22,21 @@ export class LayerReactor return (cmdName: string, historyRec: CommandHistoryRecord) => { if (!app.Database.LayerTable || !app.Database.LayerTable.Current) return; - // 图层UI随图层表更新 for (const [k, v] of historyRec.HistoryList) { const o = k.Object; + // 图层UI随图层表更新 if (o instanceof LayerTableRecord || o instanceof LayerTable) { DataToViewForLayer.UpdateAll(); break; } + // 更新视口冻结的UI + else if (o instanceof ViewportEntity) + { + if (app.Viewer.CurrentViewport) + UpdateLayerByViewPoint(app.Viewer.CurrentViewport); + } } }; }; diff --git a/src/UI/Components/ToolBar/Layer/LayerManager.tsx b/src/UI/Components/ToolBar/Layer/LayerManager.tsx index ac24a426b..79e4cfa9e 100644 --- a/src/UI/Components/ToolBar/Layer/LayerManager.tsx +++ b/src/UI/Components/ToolBar/Layer/LayerManager.tsx @@ -5,7 +5,6 @@ import React from "react"; import { app } from "../../../../ApplicationServices/Application"; import { CoolDownTime } from "../../../../Common/CoolDownTime"; import { KeyBoard } from "../../../../Common/KeyEnum"; -import { DownPanelStore } from "../../../Store/DownPanelStore"; import { ModalContainer, ModalHeader } from "../../Modal/ModalContainer"; import { AppToaster } from "../../Toaster"; import { ColorDialog } from "./Component/Color"; @@ -84,9 +83,6 @@ export class LayerManager extends React.Component<{}, {}> /** 是否放入文件夹 */ private _IsFolder = false; - /** 布局面板的状态 */ - private _DownPanelStore = DownPanelStore.GetInstance(); - /** 当前输入的图层名称 */ @observable private _LayerName = "_NULL_";