!2427 修复:柜体模块替换可视化模块空间时开门方向信息丢失

pull/2428/MERGE
林三 12 months ago committed by ChenX
parent dfd7b2cb6a
commit 014538b711

@ -1211,7 +1211,9 @@ export async function ReplaceTemplate(oldTemp: TemplateRecord, newTemp: Template
?? oldTemp.AllEntitys[0]; //已经没用了
GetEntityInfo(en, oldTemp, entInfo); //获取被替换实体信息
followAttribute(entInfo, newTemp); //房名、柜名、板名跟随
//替换对象不是有效对象时(可视化模块空间),不继承该对象属性
if (entInfo.followAttribute)
followAttribute(entInfo, newTemp); //房名、柜名、板名跟随
}
if (oldTemp?.Parent?.Object)//如果有父对象,则重新设置成它的儿子
@ -1312,7 +1314,7 @@ function GetEntityInfo(en: Entity, entTemp: TemplateRecord, option: IGetRoomInfo
option.roomName = en.HardwareOption.roomName;
}
else
return;
option.followAttribute = false;
}
/**

@ -23,6 +23,7 @@ export interface IGetRoomInfo
brMat?: string;
useMaterial?: boolean;
openDir?: BoardOpenDir | string;
followAttribute?: boolean; //是否跟随属性
remarks?: [string, string][];//备注
lockRoomName?: boolean; //锁定输入框的值
lockCabName?: boolean; //锁定输入框的值

@ -74,6 +74,7 @@ export class TemplateManage extends React.Component<ITemplateManage, {}> {
brMat: "",
useMaterial: false,
openDir: BoardOpenDir.None,
followAttribute: true,
hingeName: ""
};
@observable autoCutOption: IDrawBoardAutoCutOption = { isAutoCut: false, isRelevance: false };

Loading…
Cancel
Save