|
|
@ -1068,10 +1068,11 @@ export function RemoveTemplate(temp: TemplateRecord)
|
|
|
|
|
|
|
|
|
|
|
|
let replaceJig = new Jig();
|
|
|
|
let replaceJig = new Jig();
|
|
|
|
|
|
|
|
|
|
|
|
/**新模块替换旧模块 */
|
|
|
|
/**新模块替换旧模块 ,extendExpr-是否继承旧模板表达式*/
|
|
|
|
export async function ReplaceTemplate(oldTemp: TemplateRecord, newTemp: TemplateRecord, reSelectSpace = true)
|
|
|
|
export async function ReplaceTemplate(oldTemp: TemplateRecord, newTemp: TemplateRecord, reSelectSpace = true, extendExpr = true)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//拷贝所有共有参数
|
|
|
|
//拷贝所有共有参数
|
|
|
|
|
|
|
|
if (extendExpr) //#I1MFG0,替换虚拟空间时不继承表达式
|
|
|
|
for (let index = 0; index < oldTemp.Params.length; index++)
|
|
|
|
for (let index = 0; index < oldTemp.Params.length; index++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let oldParam = oldTemp.Params[index];
|
|
|
|
let oldParam = oldTemp.Params[index];
|
|
|
@ -1196,7 +1197,7 @@ export async function SetTemplatePositionAndSetParent(spaceParse: ISpaceParse, t
|
|
|
|
else if (spaceParse.VisualSpaceBox)
|
|
|
|
else if (spaceParse.VisualSpaceBox)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let vstemplate = spaceParse.VisualSpaceBox.Template.Object as TemplateVisualSpace;
|
|
|
|
let vstemplate = spaceParse.VisualSpaceBox.Template.Object as TemplateVisualSpace;
|
|
|
|
ReplaceTemplate(vstemplate, template);
|
|
|
|
ReplaceTemplate(vstemplate, template, true, false);
|
|
|
|
DeleteTempate(vstemplate);
|
|
|
|
DeleteTempate(vstemplate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|