Browse Source

Pull request #2737: REPORT-34739 自适应布局下调整绝对画布块高度,绝对画布块乱跳并导致撤销功能失效

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

* commit '4852af659e399f4cdaff6902c9f8db41b99b28d6':
  修改:换一种方式获取参数面板高度
  修改
  删除多余导包
  REPORT-34739 自适应布局下调整绝对画布块高度,绝对画布块乱跳并导致撤销功能失效 【问题原因】在调整绝对画布块的高度时,因为前面对绝对画布块的backupBounds做了处理,忽略了参数面板块高度带来的偏移量,所以会导致其乱跳并且撤销出错 【改动方案】在com.fr.design.designer.beans.adapters.layout.FRFitLayoutAdapter.fix(com.fr.design.designer.creator.XCreator)方法中加个判断,如果是绝对画布块,就将漏算的偏移量加上
bugfix/10.0
Yvan 4 years ago
parent
commit
6fd8ebe4eb
  1. 15
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java

15
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java

@ -19,7 +19,12 @@ import com.fr.design.designer.creator.cardlayout.XWCardTitleLayout;
import com.fr.design.designer.creator.cardlayout.XWTabFitLayout;
import com.fr.design.designer.properties.FRFitLayoutConstraints;
import com.fr.design.designer.properties.FRFitLayoutPropertiesGroupModel;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.fun.FormWidgetOptionProvider;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.JForm;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.utils.ComponentUtils;
import com.fr.form.ui.LayoutBorderStyle;
import com.fr.form.ui.container.WAbsoluteLayout;
@ -342,7 +347,15 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
//拖拽组件原大小、位置
Rectangle backupBound = creator.getBackupBound();
backupBound.x -= container.getX();
backupBound.y -= container.getY();
// REPORT-34739 对绝对画布块的backupBound.y的调整还需要考虑一下参数面板块的高度造成的偏移
int paraHeight = 0;
if (creator.acceptType(XWAbsoluteLayout.class)) {
JTemplate<?, ?> jTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (jTemplate instanceof JForm) {
paraHeight = ((JForm) jTemplate).getFormDesign().getParaHeight();
}
}
backupBound.y -= (container.getY() - paraHeight);
//当前拖拽组件的位置
int x = creator.getX();
int y = creator.getY();

Loading…
Cancel
Save