diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java index ef321e7081..2c5db9a314 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java @@ -38,6 +38,7 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; +import com.fr.design.parameter.ParameterInputNoneListenerPane; import com.fr.design.parameter.ParameterInputPane; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.ComparatorUtils; @@ -964,7 +965,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { if (parameters.length < 1 && editor4CalPane.update().size() < 1) { return parameterMap; } - ParameterInputPane pPane = new ParameterInputPane(parameters); + ParameterInputPane pPane = new ParameterInputNoneListenerPane(parameters); pPane.showSmallWindow(new JFrame(), new DialogActionAdapter() { @Override public void doOk() { diff --git a/designer-base/src/main/java/com/fr/design/parameter/ParameterInputNoneListenerPane.java b/designer-base/src/main/java/com/fr/design/parameter/ParameterInputNoneListenerPane.java new file mode 100644 index 0000000000..2484a4b206 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/parameter/ParameterInputNoneListenerPane.java @@ -0,0 +1,30 @@ +package com.fr.design.parameter; + +import com.fr.design.editor.ValueEditorPane; +import com.fr.stable.ParameterProvider; + +/** + * 与ParameterInputPane区别在于 输入参数不会触发模板修改事件 + * + * 适用于参数不需要存储在模板中的场景 + * + * @author hades + * @version 11.0 + * Created by hades on 2022/5/13 + */ +public class ParameterInputNoneListenerPane extends ParameterInputPane { + + public ParameterInputNoneListenerPane(ParameterProvider[] parameters) { + super(parameters); + } + + public ParameterInputNoneListenerPane(ParameterProvider[] parameters, boolean allowBlank) { + super(parameters, allowBlank); + } + + @Override + protected void initTextListener(ValueEditorPane textF) { + // 这边输入参数 不用联动模板变化激活保存按钮 相关参数并不存储在模板 + // do nothing + } +}