Browse Source

Merge pull request #6132 in DESIGN/design from release/10.0 to bugfix/10.0

* commit '66a242a88dcbfaf57a6ec9bf043e8662608ef844':
  fix:兼容大屏组件的cpt设置
bugfix/10.0
superman 3 years ago
parent
commit
954a20aaeb
  1. 2
      designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java
  2. 9
      designer-base/src/main/java/com/fr/design/report/fit/menupane/TemplateFitAttrPane.java

2
designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java

@ -81,7 +81,7 @@ public class ReportFitAttrAction extends JTemplateAction {
}
final FitProvider wbTpl = (FitProvider) jwb.getTarget();
ReportFitAttr fitAttr = wbTpl.getReportFitAttr();
TemplateFitAttrPane templateFitAttrPane = new TemplateFitAttrPane();
TemplateFitAttrPane templateFitAttrPane = new TemplateFitAttrPane(jwb);
showReportFitDialog(fitAttr, jwb, wbTpl, templateFitAttrPane);
}

9
designer-base/src/main/java/com/fr/design/report/fit/menupane/TemplateFitAttrPane.java

@ -1,6 +1,5 @@
package com.fr.design.report.fit.menupane;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.report.fit.BaseFitAttrPane;
@ -15,7 +14,10 @@ import java.awt.event.ItemListener;
public class TemplateFitAttrPane extends BaseFitAttrPane {
public TemplateFitAttrPane() {
private JTemplate jwb;
public TemplateFitAttrPane(JTemplate jwb) {
this.jwb = jwb;
initComponents();
}
@ -23,7 +25,7 @@ public class TemplateFitAttrPane extends BaseFitAttrPane {
protected void initComponents() {
super.initComponents();
for (FitAttrModel fitAttrModel : fitAttrModelList) {
if (fitAttrModel.isAvailable(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate())) {
if (fitAttrModel.isAvailable(jwb)) {
populateModel(fitAttrModel);
break;
}
@ -71,7 +73,6 @@ public class TemplateFitAttrPane extends BaseFitAttrPane {
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
if(isTemplateSingleSet()){
JTemplate jwb = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (jwb != null) {
FitProvider wbTpl = (FitProvider) jwb.getTarget();
ReportFitAttr fitAttr = wbTpl.getReportFitAttr();

Loading…
Cancel
Save