@ -92,6 +92,7 @@ public class MobileComponentFrozenPane extends BasicPane {
WSortLayout wSortLayout = ( ( WSortLayout ) xCreator . toData ( ) ) ;
WSortLayout wSortLayout = ( ( WSortLayout ) xCreator . toData ( ) ) ;
List < String > all = wSortLayout . getNonContainerWidgetList ( ) ;
List < String > all = wSortLayout . getNonContainerWidgetList ( ) ;
List < String > selected = wSortLayout . getFrozenWidgets ( ) ;
List < String > selected = wSortLayout . getFrozenWidgets ( ) ;
selected = fixRename ( all , selected , wSortLayout ) ;
Map < Object , Boolean > map = new LinkedHashMap < > ( ) ;
Map < Object , Boolean > map = new LinkedHashMap < > ( ) ;
for ( String value : selected ) {
for ( String value : selected ) {
map . put ( value , true ) ;
map . put ( value , true ) ;
@ -103,6 +104,24 @@ public class MobileComponentFrozenPane extends BasicPane {
uiComboCheckBox . setSelectedValues ( map ) ;
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 ( ) {
private List < String > frozenWidgets ( ) {
Form form = WidgetPropertyPane . getInstance ( ) . getEditingFormDesigner ( ) . getTarget ( ) ;
Form form = WidgetPropertyPane . getInstance ( ) . getEditingFormDesigner ( ) . getTarget ( ) ;
WLayout container = form . getContainer ( ) ;
WLayout container = form . getContainer ( ) ;