Browse Source

Pull request #4946: REPORT-54410: 决策报表,模板中其他组件的宽高修改会影响绝对画布块中组件的宽高和位置

Merge in DESIGN/design from ~STARRYI/design:release/10.0 to release/10.0

* commit '0e7d4a92517a5a81753ceb9bbbe5a4757da86578':
  REPORT-54410: 决策报表,模板中其他组件的宽高修改会影响绝对画布块中组件的宽高和位置
zheng-1641779399395
starryi 3 years ago
parent
commit
b3c812eead
  1. 14
      designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java

14
designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java

@ -780,6 +780,17 @@ public class XWFitLayout extends XLayoutContainer {
tabLayout.updateBoundsWidget(); tabLayout.updateBoundsWidget();
} }
} }
}
layout.setContainerHeight(containerHeight);
layout.setContainerWidth(containerWidth);
addCompInterval(getAcualInterval());
// REPORT-54410: 决策报表,模板中其他组件的宽高修改会影响绝对画布块中组件的宽高和位置
// 绝对布局内的组件尺寸调整需要在绝对布局的bound排除GAP后进行,否则计算出的
// 组件尺寸缩放比例会有问题
for (int index = 0, n = this.getComponentCount(); index < n; index++) {
XCreator creator = (XCreator) this.getComponent(index);
BoundsWidget wgt = (BoundsWidget) layout.getBoundsWidget(creator.toData());
//如果子组件是绝对布局,则内部的widget也要更新 //如果子组件是绝对布局,则内部的widget也要更新
if (creator.acceptType(XWAbsoluteLayout.class)){ if (creator.acceptType(XWAbsoluteLayout.class)){
//更新的时候一定要带上backupBound //更新的时候一定要带上backupBound
@ -790,9 +801,6 @@ public class XWFitLayout extends XLayoutContainer {
creator.setBackupBound(creator.getBounds()); creator.setBackupBound(creator.getBounds());
} }
} }
layout.setContainerHeight(containerHeight);
layout.setContainerWidth(containerWidth);
addCompInterval(getAcualInterval());
} }
private Rectangle recalculateWidgetBounds(Rectangle rec, int[] hors, int[] veris) { private Rectangle recalculateWidgetBounds(Rectangle rec, int[] hors, int[] veris) {

Loading…
Cancel
Save