From 705d28949b76889f968ba65d27e90c0c117f3479 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Tue, 3 Aug 2021 21:43:31 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-56080=20=E5=9B=BE=E8=A1=A8=E5=8F=8C?= =?UTF-8?q?=E5=87=BB=E6=97=A0=E6=B3=95=E8=BF=9B=E5=85=A5=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/designer/beans/models/SelectionModel.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java b/designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java index bf1c849906..df645e2dfe 100644 --- a/designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java +++ b/designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java @@ -85,13 +85,14 @@ public class SelectionModel { if (e.getButton() == MouseEvent.BUTTON3 || (!InputEventBaseOnOS.isControlDown(e) && !e.isShiftDown())) { // 如果Ctrl或者Shift键盘没有按下,则清除已经选择的组件 XCreator selectXCreator = selection.getSelectedCreator(); - if (selectXCreator != null && comp != null) { + boolean clickOnce = e.getClickCount() == 1; + boolean hasCom = selectXCreator != null && comp != null; + if (clickOnce && hasCom) { if (StringUtils.equals(selectXCreator.toData().getWidgetName(), comp.toData().getWidgetName())) { return; } } selection.reset(); - } else { //按下Ctrl或者shift键时鼠标可以进行多选,两次点击同一控件就取消选中 XLayoutContainer topLayout = XCreatorUtils.getHotspotContainer(comp).getTopLayout();