From aa9705565932a7a4455c9ff61d168e4386774e10 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Tue, 11 Aug 2020 16:51:15 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-36200=20=E3=80=90name63/user63=E3=80=91?= =?UTF-8?q?=E5=9C=A8=E6=8E=A7=E4=BB=B6=E5=8F=B3=E4=B8=8B=E6=96=B9=E5=A4=9A?= =?UTF-8?q?=E6=AC=A1=E5=A4=8D=E5=88=B6=EF=BC=8C=E5=B9=B6=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E4=B8=8D=E6=96=AD=E5=90=91=E5=8F=B3=E4=B8=8B=E5=A4=8D=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mainframe/FormSelectionUtils.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 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 b3b07efd7..c310ee578 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 @@ -94,6 +94,7 @@ public class FormSelectionUtils { designer.getSelectionModel().getSelection().reset(); Rectangle rec = clipboard.getSelctionBounds(); + boolean addSuccess = false; for (XCreator creator : clipboard.getSelectedCreators()) { try { XCreator copiedCreator = copyXcreator(designer.getTarget(), creator); @@ -107,7 +108,7 @@ public class FormSelectionUtils { return; } resetTabSub2RealSize(copiedCreator); - boolean addSuccess = adapter.addBean(copiedCreator, point.x, point.y); + addSuccess = adapter.addBean(copiedCreator, point.x, point.y); if (addSuccess) { designer.getSelectionModel().getSelection().addSelectedCreator(copiedCreator); } @@ -115,7 +116,9 @@ public class FormSelectionUtils { FineLoggerFactory.getLogger().error(e.getMessage(), e); } } - rebuildSelection(designer); + if (!addSuccess) { + rebuildSelection(designer); + } designer.getEditListenerTable().fireCreatorModified( designer.getSelectionModel().getSelection().getSelectedCreator(), DesignerEvent.CREATOR_PASTED);