From 278e09dd39d2f059b032d6f4e3634e6d809ae0b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Fri, 27 Aug 2021 13:52:21 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58081=20=E5=86=B3=E7=AD=96=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8-=E7=BB=9D=E5=AF=B9=E5=B8=83=E5=B1=80=E4=B8=8B?= =?UTF-8?q?=EF=BC=8C=E9=80=89=E4=B8=AD=E5=A4=9A=E4=B8=AA=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=EF=BC=8C=E7=B2=98=E8=B4=B4=E5=88=B0=E5=8F=A6?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E7=BB=9D=E5=AF=B9=E5=B8=83=E5=B1=80=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E4=B8=AD=EF=BC=8C=E7=8E=B0=E5=9C=A8=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E7=B2=98=E8=B4=B4=E5=BE=97=E5=88=B0=E6=89=80=E6=9C=89=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E7=9A=84=E7=BB=84=E4=BB=B6=E4=BA=86=EF=BC=8C=E5=8F=AA?= =?UTF-8?q?=E5=BE=97=E5=88=B0=E4=B8=80=E4=B8=AA=E7=BB=84=E4=BB=B6=EF=BC=9B?= =?UTF-8?q?8.2=E7=9A=84persist=E8=BF=98=E5=8F=AF=E4=BB=A5=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E5=A4=8D=E5=88=B6=E7=B2=98=E8=B4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/FormSelectionUtils.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java b/designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java index 84b8f6bf38..7d3b17f5b7 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormSelectionUtils.java @@ -84,24 +84,22 @@ public class FormSelectionUtils { } private static FormSelection filterFormSelection(FormSelection clipboard, XLayoutContainer parent) { - FormSelection newSelection = new FormSelection(); for (XCreator xCreator : clipboard.getSelectedCreators()) { if (parent.acceptType(XWParameterLayout.class)) { - if (xCreator.canEnterIntoParaPane()) { - newSelection.addSelectedCreator(xCreator); + if (!xCreator.canEnterIntoParaPane()) { + clipboard.removeCreator(xCreator); } } else if (parent.acceptType(XWAbsoluteLayout.class)) { - if (xCreator.canEnterIntoAbsolutePane()) { - newSelection.addSelectedCreator(xCreator); + if (!xCreator.canEnterIntoAbsolutePane()) { + clipboard.removeCreator(xCreator); } } else if (parent.acceptType(XWFitLayout.class)) { - if (xCreator.canEnterIntoAdaptPane()) { - newSelection.addSelectedCreator(xCreator); + if (!xCreator.canEnterIntoAdaptPane()) { + clipboard.removeCreator(xCreator); } } - } - return newSelection; + return clipboard; } private static boolean isExtraContainer(XLayoutContainer parent) {