From a92a5c82d8c6781f13a4c3105ceb871c5b962dfe Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 8 Jun 2021 14:09:53 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-53365=20&&=20REPORT-53310=20=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/gui/controlpane/UIListGroupControlPane.java | 9 +++++++++ .../com/fr/design/mainframe/CellWidgetPropertyPane.java | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java index bb7fee0a36..dbc71fe1af 100644 --- a/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java @@ -107,6 +107,15 @@ public abstract class UIListGroupControlPane extends UIControlPane implements L contentPane.add(wrapperPane); nameEdListMap.put(event, wrapperPane); } + contentPane.addMouseListener(new MouseAdapter() { + @Override + public void mousePressed(MouseEvent e) { + super.mousePressed(e); + if (selectNameEdList != null) { + selectNameEdList.stopEditing(); + } + } + }); } protected void populateNameObjects(Widget widget) { diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java index 246bb72aa8..0ddfdd3d7d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java @@ -106,6 +106,9 @@ public class CellWidgetPropertyPane extends BasicPane { final CellSelection finalCS = (CellSelection) ePane.getSelection(); final TemplateElementCase tplEC = ePane.getEditingElementCase(); final Widget cellWidget = cellEditorDefPane.update(); + if(cellWidget == null){ + return; + } if (finalCS.isSelectedOneCell(ePane)) { if (tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow()) == null) {//cellElement未加入到report中时要添加进去 tplEC.addCellElement(cellElement); @@ -141,6 +144,9 @@ public class CellWidgetPropertyPane extends BasicPane { final CellSelection finalCS = (CellSelection) selection; final TemplateElementCase tplEC = ePane.getEditingElementCase(); final Widget cellWidget = cellEditorDefPane.update(); + if(cellWidget == null){ + return; + } if(finalCS.isSelectedOneCell(ePane)){ if(tplEC.getTemplateCellElement(cellElement.getColumn(), cellElement.getRow())== null){//cellElement未加入到report中时要添加进去 tplEC.addCellElement(cellElement);