From 42d5374cf057c5ad2a572527622ff401e7531642 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 14 Jan 2020 15:05:02 +0800 Subject: [PATCH] =?UTF-8?q?MOBILE-24587=20=E9=98=B2=E6=AD=A2=E4=B8=8D?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E7=9A=84=E6=8F=90=E7=A4=BA=20&&=20=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E5=8B=BE=E9=80=89=E6=97=B6=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/mobile/MobileAdvanceDefinePane.java | 3 +++ .../component/MobileComponentFrozenPane.java | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java index c74e7c7d0..9533e552c 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java @@ -139,6 +139,9 @@ public class MobileAdvanceDefinePane extends MobileWidgetDefinePane { MobileBookMark bookMark = xCreator.toData().getMobileBookMark(); bookMark.setUseBookMark(this.useBookMarkCheck.isSelected()); String newBookMarkName = this.bookMarkNameField.getText(); + if (ComparatorUtils.equals(newBookMarkName, bookMark.getBookMarkName())) { + return; + } if (!isExist(newBookMarkName)) { bookMark.setBookMarkName(newBookMarkName); } else { diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java index da6c617c1..249265097 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java @@ -64,18 +64,26 @@ public class MobileComponentFrozenPane extends BasicPane { public void update(XCreator xCreator) { List selected = new ArrayList<>(); WSortLayout wSortLayout = ((WSortLayout) xCreator.toData()); + List all = wSortLayout.getNonContainerWidgetList(); + for (String widgetName : all) { + updateMobileBookMark(wSortLayout, widgetName, false); + } Object[] values = uiComboCheckBox.getSelectedValues(); for (Object value : values) { String widgetName = (String) value; selected.add(widgetName); - Widget widget = FormWidgetHelper.findWidgetWithBound(wSortLayout, widgetName); - if (widget != null) { - widget.getMobileBookMark().setFrozen(true); - } + updateMobileBookMark(wSortLayout, widgetName, true); } wSortLayout.updateFrozenWidgets(selected); } + private void updateMobileBookMark(WSortLayout wSortLayout, String widgetName, boolean frozen) { + Widget widget = FormWidgetHelper.findWidgetWithBound(wSortLayout, widgetName); + if (widget != null) { + widget.getMobileBookMark().setFrozen(frozen); + } + } + public void populate(XCreator xCreator) { WSortLayout wSortLayout = ((WSortLayout) xCreator.toData()); List all = wSortLayout.getNonContainerWidgetList();