修复:模块设计器,设置变量值(拾取长度时)模块被错误的设置参数值

pull/3055/MERGE
ChenX 4 weeks ago
parent 3fbf5e2479
commit a30aa7f89c

@ -264,9 +264,20 @@ export default class TemplateParamList extends React.Component<ITemplateParamLis
{
let dist = distRes.Distance;
const store = this.props.store;
store.params[store.currentParamIndex].value = dist.toFixed(2);
store.Template.Params[store.currentParamIndex].value = parseFloat(dist.toFixed(2));
await store.Template.UpdateTemplateTree();
let param = store.params[store.currentParamIndex];
param.value = dist.toFixed(2);
let tParam = store.Template.GetParam(param.name);
if (tParam)
{
tParam.value = parseFloat(param.value);
await store.Template.UpdateTemplateTree();
}
else
AppToaster.show({
message: "程序错误:无法找到该变量!",
timeout: 3000,
intent: Intent.DANGER
}, "errorval");
}
};
private setCoordinate = async () =>

Loading…
Cancel
Save