!2833 修复: 视口冻结的UI更新(给图层加个补丁)

Merge pull request !2833 from 张子涵/fix_layer
pull/2834/head
张子涵 3 months ago committed by 林三
parent 70fd7372a0
commit 82a25243f1

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

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

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

Loading…
Cancel
Save