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. 27
      designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java

27
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)) { String[][] widgetName = new String[mobileWidgetList.size() + 1][1];
List<String> mobileWidgetList = ((WSortLayout) selectedModel).getOrderedMobileWidgetList(); widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder");
String[][] widgetName = new String[mobileWidgetList.size() + 1][1]; for (int i = 0; i < mobileWidgetList.size(); i++) {
widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder"); widgetName[i + 1][0] = mobileWidgetList.get(i);
for (int i = 0; i < mobileWidgetList.size(); i++) {
widgetName[i + 1][0] = mobileWidgetList.get(i);
}
return widgetName;
} else {
return new String[0][0];
} }
if (!body.isSorted()) {
body.setSorted(true);
}
return widgetName;
} }
public boolean isCollapsed() { public boolean isCollapsed() {

Loading…
Cancel
Save