Browse Source

REPORT-72468 决策报表-frm拖入tab块,tab内拖入两个图表块和两个文本域控件,重复随机拖拽调整组件位置,会突然出现组件重叠且错乱的现象

release/11.0
kerry 2 years ago
parent
commit
3da899e0e5
  1. 21
      designer-form/src/main/java/com/fr/design/mainframe/FormArea.java

21
designer-form/src/main/java/com/fr/design/mainframe/FormArea.java

@ -771,15 +771,24 @@ public class FormArea extends JComponent implements ScrollRulerComponent {
heightPane.setValue(height);
reCalculateHeight((int) height);
}
if (designer.getRootComponent().acceptType(XWFitLayout.class) ) {
XWFitLayout layout = (XWFitLayout) designer.getRootComponent();
// 撤销时先refreshRoot了,此处去掉内边距再增加间隔
layout.moveContainerMargin();
layout.addCompInterval(layout.getAcualInterval());
}
traverAndAdjust(designer.getRootComponent());
this.slidePane.setShowValue((int) slide);
}
// 撤销时先refreshRoot了,此处去掉内边距再增加间隔,循环遍历布局,调整fitlayout布局的间隔
private void traverAndAdjust(XCreator creator) {
if (creator instanceof XWFitLayout) {
XWFitLayout temp = (XWFitLayout) creator;
temp.moveContainerMargin();
temp.addCompInterval(temp.getAcualInterval());
}
for (int i = 0; i < creator.getComponentCount(); i++) {
Object object = creator.getComponent(i);
if (object instanceof XCreator){
traverAndAdjust((XCreator) object);
}
}
}
/**
* 计算滚动条的值和max

Loading…
Cancel
Save