Browse Source

Pull request #3900: REPORT-50664 【移动端】body设置绝对布局,组件设置侧边导航后,还能设置组件冻结,为bug

Merge in DESIGN/design from ~STARRYI/design:release/10.0 to release/10.0

* commit '316c1eaecf02b1ba5d7fc8120fd8b1379f5ad927':
  REPORT-50664  【移动端】body设置绝对布局,组件设置侧边导航后,还能设置组件冻结,为bug
zheng-1641779399395
starryi 4 years ago
parent
commit
4093ff15d2
  1. 18
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java

18
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java

@ -14,6 +14,8 @@ import com.fr.design.widget.FRWidgetFactory;
import com.fr.form.main.Form; import com.fr.form.main.Form;
import com.fr.form.ui.FormWidgetHelper; import com.fr.form.ui.FormWidgetHelper;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WBodyLayoutType;
import com.fr.form.ui.container.WFitLayout;
import com.fr.form.ui.container.WLayout; import com.fr.form.ui.container.WLayout;
import com.fr.form.ui.container.WSortLayout; import com.fr.form.ui.container.WSortLayout;
import com.fr.form.ui.widget.CRBoundsWidget; import com.fr.form.ui.widget.CRBoundsWidget;
@ -123,9 +125,7 @@ public class MobileComponentFrozenPane extends BasicPane {
} }
private List<String> frozenWidgets() { private List<String> frozenWidgets() {
Form form = WidgetPropertyPane.getInstance().getEditingFormDesigner().getTarget(); WSortLayout wSortLayout = getBodyWSortLayout();
WLayout container = form.getContainer();
WSortLayout wSortLayout = (WSortLayout) container.getWidget(container.getWidgetCount() - 1);
List<String> list = wSortLayout.getNonContainerWidgetList(); List<String> list = wSortLayout.getNonContainerWidgetList();
List<String> widgets = new ArrayList<>(); List<String> widgets = new ArrayList<>();
for (String value : list) { for (String value : list) {
@ -137,6 +137,18 @@ public class MobileComponentFrozenPane extends BasicPane {
return widgets; return widgets;
} }
private WSortLayout getBodyWSortLayout() {
Form form = WidgetPropertyPane.getInstance().getEditingFormDesigner().getTarget();
WLayout container = form.getContainer();
WFitLayout wFitLayout = (WFitLayout) container.getWidget(container.getWidgetCount() - 1);
WSortLayout wSortLayout = wFitLayout;
if (wFitLayout.getBodyLayoutType() == WBodyLayoutType.ABSOLUTE) {
CRBoundsWidget boundsWidget = (CRBoundsWidget) wFitLayout.getWidget(0);
wSortLayout = (WSortLayout) boundsWidget.getWidget();
}
return wSortLayout;
}
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return "ComponentFrozenPane"; return "ComponentFrozenPane";

Loading…
Cancel
Save