Browse Source

Merge pull request #1448 in DESIGN/design from ~HADES/design:bugfix/10.0 to bugfix/10.0

* commit 'b5e312362576324171af5048ae7912998dd58d98':
  fix
  MOBILE-25615 高度重置问题
bugfix/10.0
Hades 5 years ago
parent
commit
b0899d0c8d
  1. 14
      designer-form/src/main/java/com/fr/design/actions/FormMobileAttrAction.java
  2. 4
      designer-form/src/main/java/com/fr/design/form/mobile/FormMobileTemplateSettingsPane.java

14
designer-form/src/main/java/com/fr/design/actions/FormMobileAttrAction.java

@ -56,6 +56,9 @@ public class FormMobileAttrAction extends JTemplateAction<JForm> {
final FormMobileAttrPane mobileAttrPane = new FormMobileAttrPane(); final FormMobileAttrPane mobileAttrPane = new FormMobileAttrPane();
mobileAttrPane.populateBean(mobileAttr); mobileAttrPane.populateBean(mobileAttr);
final boolean oldMobileOnly = mobileAttr.isMobileOnly();
final boolean oldAdaptive = mobileAttr.isAdaptivePropertyAutoMatch();
BasicDialog dialog = mobileAttrPane.showWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { BasicDialog dialog = mobileAttrPane.showWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override @Override
public void doOk() { public void doOk() {
@ -75,11 +78,16 @@ public class FormMobileAttrAction extends JTemplateAction<JForm> {
recordFunction(); recordFunction();
// 设置移动端属性并刷新界面 // 设置移动端属性并刷新界面
formTpl.setFormMobileAttr(formMobileAttr); // 会调整 body 的自适应布局,放到最后 formTpl.setFormMobileAttr(formMobileAttr); // 会调整 body 的自适应布局,放到最后
((FormArea)jf.getFormDesign().getParent()).onMobileAttrModified(); boolean changeSize = (!oldMobileOnly && formMobileAttr.isMobileOnly()) || (oldMobileOnly && !formMobileAttr.isMobileOnly());
if (changeSize) {
((FormArea)jf.getFormDesign().getParent()).onMobileAttrModified();
}
jf.getFormDesign().getSelectionModel().setSelectedCreator(jf.getFormDesign().getRootComponent()); jf.getFormDesign().getSelectionModel().setSelectedCreator(jf.getFormDesign().getRootComponent());
//改变布局为自适应布局,只在移动端属性设置保存后改变一次 //改变布局为自适应布局,只在移动端属性设置保存后改变一次
doChangeBodyLayout(); boolean changeLayout = !oldAdaptive && formMobileAttr.isAdaptivePropertyAutoMatch();
if (changeLayout) {
doChangeBodyLayout();
}
WidgetPropertyPane.getInstance().refreshDockingView(); WidgetPropertyPane.getInstance().refreshDockingView();
jf.fireTargetModified(); jf.fireTargetModified();
} }

4
designer-form/src/main/java/com/fr/design/form/mobile/FormMobileTemplateSettingsPane.java

@ -47,9 +47,7 @@ public class FormMobileTemplateSettingsPane extends BasicBeanPane<FormMobileAttr
public void doChange() { public void doChange() {
boolean mobileOnlyCheckSelected = mobileOnlyCheck.isSelected(); boolean mobileOnlyCheckSelected = mobileOnlyCheck.isSelected();
mobileSettingsPane.setVisible(mobileOnlyCheckSelected); mobileSettingsPane.setVisible(mobileOnlyCheckSelected);
if (mobileOnlyCheckSelected) { adaptivePropertyAutoMatchCheck.setSelected(mobileOnlyCheckSelected);
adaptivePropertyAutoMatchCheck.setSelected(true);
}
} }
}); });

Loading…
Cancel
Save