!2871 修复:见光面封边初始化后界面未更新

pull/2872/head
黄诗津 3 months ago
parent f9d2f098fd
commit acc0a430dc

@ -16,7 +16,7 @@ import { GetCompoentObjectIdString } from "../../UI/Components/ComponentObjectId
import { CommonModal } from "../../UI/Components/Modal/ModalContainer";
import { userConfigStore } from "../../UI/Store/UserConfigStore";
import { SetSmoothEdges } from "./SetSmoothEdgeFace";
import { SmoothEdgeStore, smoothEdgeStore } from "./SmoothEdgeStore";
import { SmoothEdgeStore } from "./SmoothEdgeStore";
export class SetSmoothEdge implements Command
{
@ -28,8 +28,11 @@ export class SetSmoothEdge implements Command
Filter: { filterTypes: [Board] }
});
let store = SmoothEdgeStore.GetInstance() as SmoothEdgeStore;
if (brRes.Status === PromptStatus.Cancel) return;
app.Editor.ModalManage.RenderModal(SetSmoothEdgeModal, { brs: brRes.SelectSet.SelectEntityList, store: smoothEdgeStore });
app.Editor.ModalManage.RenderModal(SetSmoothEdgeModal, { brs: brRes.SelectSet.SelectEntityList, store });
}
}
export enum SmoothEdgeType

@ -1,11 +1,12 @@
import { observable, toJS } from "mobx";
import { DataAdapter } from "../../Common/DataAdapter";
import { Singleton } from "../../Common/Singleton";
import { IConfigOption } from "../../UI/Components/Board/UserConfigComponent";
import { IConfigStore } from "../../UI/Store/BoardStore";
import { ISmoothEdgeOption, IUiOption } from "../../UI/Store/OptionInterface/IOptionInterface";
import { SmoothEdgeType } from "./SetSmoothEdge";
export class SmoothEdgeStore implements IConfigStore
export class SmoothEdgeStore extends Singleton implements IConfigStore
{
@observable configName = "默认";
@observable configsNames = ['默认'];
@ -20,13 +21,15 @@ export class SmoothEdgeStore implements IConfigStore
InitOption()
{
this.option = {
Object.assign(this.option, {
version: 2,
smoothEdge: 0,
edge: 0,
scale: 5,
filterArrs: Array.from({ length: 20 }, () => ["", "封厚边"]),
};
});
if (this.uiOption)
Object.assign(this.uiOption, DataAdapter.ConvertUIData(this.option));
}
get UiOption()
{
@ -69,6 +72,3 @@ export class SmoothEdgeStore implements IConfigStore
Object.assign(this.uiOption, DataAdapter.ConvertUIData(cof.option));
}
}
export const smoothEdgeStore = new SmoothEdgeStore();

Loading…
Cancel
Save