Browse Source

Pull request #2981: REPORT-44051 远程打开含数据集多的模板慢

Merge in DESIGN/design from ~HADES/design:bugfix/10.0 to bugfix/10.0

* commit 'a68e220df22bcbd31e0843e563ae53405d7d427e':
  REPORT-44051 远程打开含数据集多的模板慢
bugfix/10.0
Hades 4 years ago
parent
commit
f90a65cbae
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  2. 5
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java
  3. 4
      designer-form/src/main/java/com/fr/design/mainframe/FormModelAdapter.java
  4. 3
      designer-realize/src/main/java/com/fr/design/mainframe/WorkBookModelAdapter.java
  5. 2
      designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java

2
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -136,9 +136,9 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
this.editingFILE = file; this.editingFILE = file;
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder()); this.setBorder(BorderFactory.createEmptyBorder());
designModel = createDesignModel();
addCenterPane(); addCenterPane();
this.undoState = createUndoState(); this.undoState = createUndoState();
designModel = createDesignModel();
consumeTimer.setEnabled(shouldInitForCollectInfo(isNewFile)); consumeTimer.setEnabled(shouldInitForCollectInfo(isNewFile));
initAndStartPlugin(); initAndStartPlugin();

5
designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java

@ -3,6 +3,7 @@ package com.fr.design.mainframe;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
@ -204,7 +205,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
*/ */
public void populateParameterPropertyPane() { public void populateParameterPropertyPane() {
//参数 //参数
setParameterArray(getNoRepeatParas(getTarget().getParameters())); setParameterArray(DesignModelAdapter.getCurrentModelAdapter().getParameters());
refreshParameter(); refreshParameter();
//容器 //容器
ParameterPropertyPane.getInstance().populateBean(this); ParameterPropertyPane.getInstance().populateBean(this);
@ -728,7 +729,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
if (evt.getCreatorEventID() != DesignerEvent.CREATOR_SELECTED) { if (evt.getCreatorEventID() != DesignerEvent.CREATOR_SELECTED) {
FormDesigner.this.fireTargetModified(); FormDesigner.this.fireTargetModified();
if (evt.getCreatorEventID() == DesignerEvent.CREATOR_DELETED) { if (evt.getCreatorEventID() == DesignerEvent.CREATOR_DELETED) {
setParameterArray(getNoRepeatParas(getTarget().getParameters())); setParameterArray(getNoRepeatParas(DesignModelAdapter.getCurrentModelAdapter().getParameters()));
refreshParameter(); refreshParameter();
} }
} else { } else {

4
designer-form/src/main/java/com/fr/design/mainframe/FormModelAdapter.java

@ -36,10 +36,10 @@ public class FormModelAdapter extends DesignModelAdapter<Form, BaseJForm<Form>>
* 参数改变. * 参数改变.
*/ */
public void parameterChanged() { public void parameterChanged() {
//实时更新参数
jTemplate.populateParameter();
// 更新缓存的参数 // 更新缓存的参数
updateCachedParameter(); updateCachedParameter();
//实时更新参数
jTemplate.populateParameter();
} }
/** /**

3
designer-realize/src/main/java/com/fr/design/mainframe/WorkBookModelAdapter.java

@ -66,9 +66,10 @@ public class WorkBookModelAdapter extends DesignModelAdapter<WorkBook, JWorkBook
* 参数改变. * 参数改变.
*/ */
public void parameterChanged() { public void parameterChanged() {
// 参数改变 先更新缓存
updateCachedParameter();
jTemplate.updateReportParameterAttr(); jTemplate.updateReportParameterAttr();
jTemplate.populateReportParameterAttr(); jTemplate.populateReportParameterAttr();
updateCachedParameter();
} }
/** /**

2
designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java

@ -275,7 +275,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
paraDesignEditor.populate(parameterUI); paraDesignEditor.populate(parameterUI);
parameterArray = getNoRepeatParas(getTargetParameter(workBook)); parameterArray = getNoRepeatParas(DesignModelAdapter.getCurrentModelAdapter().getParameters());
refreshParameter(); refreshParameter();
allParameters = reportParameterAttr.getParameters(); allParameters = reportParameterAttr.getParameters();

Loading…
Cancel
Save