Browse Source

Merge pull request #1439 in BA/design from ~FANGLEI/design:release/9.0 to release/9.0

* commit '620cb6f49e3fdc01a6921c2566bbc43140850246':
  MOBILE-6599 设置组件不可用会导致组件顺序错乱
master
superman 7 years ago
parent
commit
b1d9c19d91
  1. 17
      designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java

17
designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java

@ -250,26 +250,23 @@ public class MobileWidgetTable extends JTable {
return new String[0][0]; return new String[0][0];
} }
//选择的控件 WFitLayout body = (WFitLayout) designer.getRootComponent().toData();
XCreator selectedCreator = designer.getSelectionModel().getSelection().getSelectedCreator();
Widget selectedModel = selectedCreator != null ? selectedCreator.toData() : null;
if (selectedModel == null) { if (body == null || !body.acceptType(WSortLayout.class)) {
return new String[0][0]; return new String[0][0];
} }
// 选择的控件有两种类型,一种是WLayout,代表容器,一种是Widget,代表控件 List<String> mobileWidgetList = body.getOrderedMobileWidgetList();
if (selectedModel.acceptType(WSortLayout.class)) {
List<String> mobileWidgetList = ((WSortLayout) selectedModel).getOrderedMobileWidgetList();
String[][] widgetName = new String[mobileWidgetList.size() + 1][1]; String[][] widgetName = new String[mobileWidgetList.size() + 1][1];
widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder"); widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder");
for (int i = 0; i < mobileWidgetList.size(); i++) { for (int i = 0; i < mobileWidgetList.size(); i++) {
widgetName[i + 1][0] = mobileWidgetList.get(i); widgetName[i + 1][0] = mobileWidgetList.get(i);
} }
return widgetName; if (!body.isSorted()) {
} else { body.setSorted(true);
return new String[0][0];
} }
return widgetName;
} }
public boolean isCollapsed() { public boolean isCollapsed() {

Loading…
Cancel
Save