From debdd3bcf71354f617e435b263aabac643d40ea2 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 21 Oct 2020 15:21:52 +0800 Subject: [PATCH] =?UTF-8?q?MOBILE-29626=20=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E9=A1=B6=E9=83=A8=E5=86=BB=E7=BB=93=E3=80=91=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E3=80=8Bchart1=E8=AE=BE=E7=BD=AE=E4=BA=86=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=A1=B6=E9=83=A8=E5=86=BB=E7=BB=93=E5=90=8E=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9chart1=E7=9A=84=E6=8E=A7=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=EF=BC=8C=E5=86=8D=E6=AC=A1=E6=9F=A5=E7=9C=8B=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=A1=B6=E9=83=A8=E5=86=BB=E7=BB=93=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=EF=BC=8C=E8=AF=A5=E7=BB=84=E4=BB=B6=E6=9C=AA?= =?UTF-8?q?=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/MobileComponentFrozenPane.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 de86a07f2..0dd2fcc15 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 @@ -92,6 +92,7 @@ public class MobileComponentFrozenPane extends BasicPane { WSortLayout wSortLayout = ((WSortLayout) xCreator.toData()); List all = wSortLayout.getNonContainerWidgetList(); List selected = wSortLayout.getFrozenWidgets(); + selected = fixRename(all, selected, wSortLayout); Map map = new LinkedHashMap<>(); for (String value : selected) { map.put(value, true); @@ -103,6 +104,24 @@ public class MobileComponentFrozenPane extends BasicPane { uiComboCheckBox.setSelectedValues(map); } + private List fixRename(List all, List selected, WSortLayout wSortLayout) { + // 存在重命名 + if (!selected.isEmpty() && !all.containsAll(selected)) { + // 清空原选中的 selected是Unmodifiable的 + selected = new ArrayList<>(); + for (String name : all) { + Widget widget = FormWidgetHelper.findWidgetWithBound(wSortLayout, name); + if (widget != null && widget.getMobileBookMark().isFrozen()) { + // 重新添加 + selected.add(name); + } + } + // 同时更新下 + wSortLayout.updateFrozenWidgets(selected); + } + return selected; + } + private List frozenWidgets() { Form form = WidgetPropertyPane.getInstance().getEditingFormDesigner().getTarget(); WLayout container = form.getContainer();