!2058 修复:切换账号清理选择门窗模板的缓存,优化UI聚焦

pull/2061/MERGE
林三 2 years ago committed by ChenX
parent f82876dfc2
commit e1e1a99680

@ -140,12 +140,11 @@ export class R2BConfigComponent extends React.Component<IR2BConfigComponentProps
app.Editor.ModalManage.RenderModeless(TemplateManage, { tempalteStore, R2bReplace: { isR2bReplace: true } });
let state = await app.Editor.ModalManage.Wait();
modal.Focus();
if (state.Status !== ModalState.Ok)
return;
modal.Focus();
store.m_Option.backBrTemplateId = state.Data.tempId;
store.m_Option.backBrTemplate = state.Data.temp;
}}
/>
</div>

@ -48,6 +48,7 @@ export class DoorWindowPanelStore implements IConfigStore
this.currentDoorWindowsInfo = undefined;
this.currentLeftBayWindowsInfo = undefined;
this.currentRightBayWindowsInfo = undefined;
this.selectTemplateInfo = { temp: { id: "", name: "", logo: "" } };
}
InitCurrentWindowOption(windowTemp: TemplateWindowRecord)

@ -141,7 +141,10 @@ export class WindowTempSelect extends React.Component<IWindowTempSelectProps, {}
private handleClose = (modalState: ModalState) =>
{
if (this.props.selectDiv)
{
this.props.selectDiv.style.visibility = Visibility.Hidden;
app.Editor.ModalManage.CurrentModal.Focus();
}
else
{
app.Editor.ModalManage.m_PromisRes({ Status: modalState });

@ -14,7 +14,7 @@ import { CADFiler } from "../../DatabaseServices/CADFiler";
import { CommandServer } from "../../DatabaseServices/CommandServer";
import { FileServer } from "../../DatabaseServices/FileServer";
import { Light } from "../../DatabaseServices/Lights/Light";
import { DoorWindowPanelStore } from "../../DatabaseServices/Room/Entity/Wall/Hole/Window/WindowPanelStore";
import { doorPanelStore, DoorWindowPanelStore, windowPanelStore } from "../../DatabaseServices/Room/Entity/Wall/Hole/Window/WindowPanelStore";
import { LimitCommand } from "../../Editor/CommandRegister";
import { userConfig } from "../../Editor/UserConfig";
import { RenderType } from "../../GraphicsSystem/RenderType";
@ -193,6 +193,13 @@ export class UserConfigStore extends Singleton
}
}
private InitDoorWindowPanelStore()
{
DoorWindowPanelStore.GetSingleInstance().InitOption();
windowPanelStore.InitOption();
doorPanelStore.InitOption();
}
/**处理用户登陆后的信息 */
async InitUserData()
{
@ -215,8 +222,9 @@ export class UserConfigStore extends Singleton
await this.InitCommonPanelStore();
await this.InitModelingStore();
await (DownPanelStore.GetInstance() as DownPanelStore).Update();
this.InitDoorWindowPanelStore();
RoomBaseParamsStore.GetSingleInstance();
DoorWindowPanelStore.GetSingleInstance().InitOption();
ResourceStore.GetInstance();
await this.InitCustomCmd();
await LimitCommand();
@ -241,7 +249,6 @@ export class UserConfigStore extends Singleton
return configs[curName];
}
return null;
}
private ChangeDrillRuleMap(configs: IConfigOption)
{
@ -285,8 +292,6 @@ export class UserConfigStore extends Singleton
this.ChangeDrillRuleMap(configs);
return configs;
}
async SaveConfig(type: BoardModalType, store: IConfigStore, option: ISaveOption = {}, tagName?: string)
{
const { isInit = false, isCheckName = false, toaster = true } = option;

Loading…
Cancel
Save