From 5226dd118d71685d81f330cf4823847cf1cb4f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Fri, 5 Nov 2021 18:10:14 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-60528=20=E4=BF=AE=E5=A4=8D=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E5=9C=A8=E5=BC=B9=E7=AA=97=E6=8F=90=E7=A4=BAtablayout?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E6=9C=89=E9=97=AE=E9=A2=98=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=EF=BC=8C=E5=88=A4=E6=96=AD=E5=A4=84=E7=90=86=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/FRCardMainBorderLayoutAdapter.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java index 726c397060..dd9e03c8db 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRCardMainBorderLayoutAdapter.java @@ -64,21 +64,18 @@ public class FRCardMainBorderLayoutAdapter extends FRBorderLayoutAdapter { private boolean isBeyondMinConstraint(int minConstraint, int value) { if (minConstraint > value) { FineJOptionPane.showMessageDialog(null, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Beyond_Tablayout_Bounds")); - if (container.getBackupBound() != null) { - // 手动拖动导致变矮的场景 - container.setSize(container.getBackupBound().getSize()); - } else { - // 自适应布局平分高度导致变矮的场景 + JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (jt != null && jt.getUndoManager().canUndo()) { + // 自适应布局平分高度导致变矮的场景,优先做撤销 UIUtil.invokeLaterIfNeeded(new Runnable() { @Override public void run() { - JTemplate jt = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if (jt != null) { - jt.undo(); - } + jt.undo(); } }); - + } else if (container.getBackupBound() != null) { + // 手动拖动导致变矮的场景 + container.setSize(container.getBackupBound().getSize()); } return true; } else {