From 738ded6e88ae30eb4274ef80d0282b1572d9ed5f Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 11 Oct 2017 18:30:39 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-4717=20[9.0=E5=86=85=E6=B5=8B]=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=9D=E5=AF=B9=E5=B8=83=E5=B1=80=E5=86=B3?= =?UTF-8?q?=E7=AD=96=E6=8A=A5=E8=A1=A8body=E6=A0=B7=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=88=97=E8=A1=A8=E4=BC=9A=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E4=B8=A4=E4=B8=AAbody=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/layout/FRFitLayoutDefinePane.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java b/designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java index 1b88936c9..eaafb9dbf 100644 --- a/designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java +++ b/designer_form/src/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java @@ -3,6 +3,7 @@ package com.fr.design.widget.ui.designer.layout; import com.fr.design.data.DataCreatorUI; import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.creator.XCreator; +import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWAbsoluteBodyLayout; import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.designer.creator.XWScaleLayout; @@ -117,6 +118,13 @@ public class FRFitLayoutDefinePane extends AbstractDataModify { @Override public void populateBean(WFitLayout ob) { + FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner(); + XLayoutContainer rootLayout = selectedBodyLayout(formDesigner); + if (rootLayout != formDesigner.getRootComponent() + && formDesigner.getSelectionModel().getSelection().getSelectedCreator() == formDesigner.getRootComponent()) { + formDesigner.getSelectionModel().setSelectedCreators( + FormSelectionUtils.rebuildSelection(xWFitLayout, new Widget[]{selectedBodyLayout(formDesigner).toData()})); + } paddingBound.populate(ob); layoutComboBox.setSelectedIndex(ob.getBodyLayoutType().getTypeValue()); adaptComboBox.setSelectedIndex(ob.getCompState()); @@ -124,6 +132,14 @@ public class FRFitLayoutDefinePane extends AbstractDataModify { stylePane.setValue(ob.getBorderStyle()); } + private XLayoutContainer selectedBodyLayout(FormDesigner formDesigner) { + XLayoutContainer rootLayout = formDesigner.getRootComponent(); + if (rootLayout.getComponentCount() == 1 && rootLayout.getXCreator(0).acceptType(XWAbsoluteBodyLayout.class)){ + rootLayout = (XWAbsoluteBodyLayout)rootLayout.getXCreator(0); + } + return rootLayout; + } + @Override public WFitLayout updateBean() {