Browse Source

MOBILE-29626 【组件顶部冻结】设计器》chart1设置了组件顶部冻结后,修改chart1的控件名称,再次查看组件顶部冻结设置界面,该组件未选中

feature/big-screen
hades 4 years ago
parent
commit
debdd3bcf7
  1. 19
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java

19
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<String> all = wSortLayout.getNonContainerWidgetList();
List<String> selected = wSortLayout.getFrozenWidgets();
selected = fixRename(all, selected, wSortLayout);
Map<Object, Boolean> 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<String> fixRename(List<String> all, List<String> 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<String> frozenWidgets() {
Form form = WidgetPropertyPane.getInstance().getEditingFormDesigner().getTarget();
WLayout container = form.getContainer();

Loading…
Cancel
Save