From 0703562439dd39729908757d7f9d7ee54f68d51f Mon Sep 17 00:00:00 2001 From: Starryi Date: Fri, 9 Jul 2021 17:50:34 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-55089=20=E7=BB=84=E4=BB=B6=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E5=88=86=E7=A6=BB=E3=80=91=E7=BB=84=E4=BB=B6=E5=A4=8D?= =?UTF-8?q?=E7=94=A8-=E7=8E=B0=E5=9C=A8=E9=94=81=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=9C=A8=E5=AE=BD=E9=AB=98=E5=80=BC=E4=B9=8B=E9=97=B4=EF=BC=8C?= =?UTF-8?q?=E9=94=81=E5=AE=9A=E6=97=B6=EF=BC=8C=E6=8B=96=E6=8B=BD=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E7=BB=84=E4=BB=B6=E5=A4=A7=E5=B0=8F=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=AE=BD=E5=BA=A6=E5=80=BC=E4=BC=9A=E5=8F=98=E5=8C=96=E6=88=90?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=BE=88=E9=95=BF=E7=9A=84=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【问题原因】 因为尺寸比例锁定,所以宽度设置控件和高度设置控件的显示内容做了关联:当宽度设置控件发生变化后,会自动修改高度控制的显示只, 反之亦然。因为上述关联,导致拖拽结束后,重新设置面板上尺寸显示值时,高度设置控件的值后更细,联动宽度控件的值,所以宽度控件 的值被修改,显示错误 【改动思路】 populate中设置宽度和高度值时,先临时关闭比例锁定 【review建议】 --- .../design/widget/ui/designer/component/WidgetBoundPane.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java index e963bf7130..bfcaeb60e7 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/component/WidgetBoundPane.java @@ -104,6 +104,10 @@ public class WidgetBoundPane extends BasicPane { public void populate() { Rectangle bounds = new Rectangle(creator.getBounds()); + if (ratioLockedButton != null) { + // 临时禁止尺寸比例锁定,关掉widthSpinner/heightSpinner之间的数值关联,以更新其高度和宽度值 + ratioLockedButton.setLocked(false); + } width.setValue(bounds.width); height.setValue(bounds.height); if (ratioLockedButton != null) {