diff --git a/designer/src/com/fr/design/mainframe/ElementCasePane.java b/designer/src/com/fr/design/mainframe/ElementCasePane.java index d38a32e1c..94fdcead8 100644 --- a/designer/src/com/fr/design/mainframe/ElementCasePane.java +++ b/designer/src/com/fr/design/mainframe/ElementCasePane.java @@ -1325,7 +1325,7 @@ public abstract class ElementCasePane extends Tar * @return 返回正在编辑的状态. */ public EditingState createEditingState() { - return new ElementCaseEditingState(this.selection, this.verScrollBar.getValue(), this.horScrollBar.getValue(), this.getResolution()); + return new ElementCaseEditingState(this.selection, this.verScrollBar.getValue(), this.horScrollBar.getValue(), this.resolution); } public void setCellNeedTOFormat(CellSelection selection) { @@ -1352,6 +1352,7 @@ public abstract class ElementCasePane extends Tar } this.verticalValue = verticalValue; this.horizontalValue = horizontalValue; + this.resolution = resolution; } @Override @@ -1365,7 +1366,8 @@ public abstract class ElementCasePane extends Tar ElementCasePane.this.getVerticalScrollBar().setValue(this.verticalValue); ElementCasePane.this.getHorizontalScrollBar().setValue(this.horizontalValue); - +// ElementCasePane.this.setResolution(this.resolution); + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setScale(this.resolution); // 重绘. ElementCasePane.this.repaint(); } diff --git a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java index 96255c5dc..718e92274 100644 --- a/designer/src/com/fr/design/mainframe/ReportComponentComposite.java +++ b/designer/src/com/fr/design/mainframe/ReportComponentComposite.java @@ -120,12 +120,16 @@ public class ReportComponentComposite extends JComponent { EditingState reportPaneEditState = templateStateList.get(newIndex); if (reportPaneEditState != null) { reportPaneEditState.revert(); + updateJSlider(); } } else { while (templateStateList.size() <= newIndex) { templateStateList.add(null); } centerCardPane.editingComponet.setSelection(centerCardPane.editingComponet.getDefaultSelectElement()); + if (jSliderContainer != null){ + jSliderContainer.reset(); + } } if (centerCardPane.editingComponet.elementCasePane == null) { @@ -141,6 +145,15 @@ public class ReportComponentComposite extends JComponent { } } + private void updateJSlider(){ + if (centerCardPane.editingComponet.elementCasePane == null) { + jSliderContainer.getShowVal().setValue(centerCardPane.getPolyDezi().getResolution() * HUND / ScreenResolution.getScreenResolution()); + }else { + jSliderContainer.getShowVal().setValue(centerCardPane.editingComponet.elementCasePane.getResolution() * HUND / ScreenResolution.getScreenResolution()); + } + + } + /** * 移除选中状态 * diff --git a/designer/src/com/fr/poly/PolyDesigner.java b/designer/src/com/fr/poly/PolyDesigner.java index fcafd4c8c..ab311457f 100644 --- a/designer/src/com/fr/poly/PolyDesigner.java +++ b/designer/src/com/fr/poly/PolyDesigner.java @@ -687,14 +687,16 @@ public class PolyDesigner extends ReportComponent