Browse Source

Pull request #6169: REPORT-60528 决策报表,给一个高度较小的tab内拖入报表块,会触发弹窗提示“超出或者小于tablayout边界,不能调整大小”;客户模板的弹窗不断触发导致设计器无法操作使用

Merge in DESIGN/design from ~FANGLEI/design10.0:release/11.0 to release/11.0

* commit '30f09d8fd0c3020533131697f5c8acb5f1ecc487':
  REPORT-60528 决策报表,给一个高度较小的tab内拖入报表块,会触发弹窗提示“超出或者小于tablayout边界,不能调整大小”;客户模板的弹窗不断触发导致设计器无法操作使用
bugfix/11.0
fanglei 3 years ago
parent
commit
27baf90131
  1. 18
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java

18
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java

@ -4,7 +4,10 @@ import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.cardlayout.XWCardTagLayout; import com.fr.design.designer.creator.cardlayout.XWCardTagLayout;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.form.layout.FRBorderLayout; import com.fr.design.form.layout.FRBorderLayout;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.ui.util.UIUtil;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import java.awt.BorderLayout; import java.awt.BorderLayout;
@ -61,7 +64,22 @@ public class FRCardMainBorderLayoutAdapter extends FRBorderLayoutAdapter {
private boolean isBeyondMinConstraint(int minConstraint, int value) { private boolean isBeyondMinConstraint(int minConstraint, int value) {
if (minConstraint > value) { if (minConstraint > value) {
FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds")); FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds"));
if (container.getBackupBound() != null) {
// 手动拖动导致变矮的场景
container.setSize(container.getBackupBound().getSize()); container.setSize(container.getBackupBound().getSize());
} else {
// 自适应布局平分高度导致变矮的场景
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
JTemplate<?, ?> jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jt != null) {
jt.undo();
}
}
});
}
return true; return true;
} else { } else {
return false; return false;

Loading…
Cancel
Save