Browse Source

REPORT-57551 设计器显示,自适应布局下body背景设置以后,画布中没有实时显示背景

【问题原因】
body布局切换时,除了要重新设置body widget样式数据模型,还要
刷新样式预览效果

【改动思路】
同标题
research/11.0
Starryi 3 years ago
parent
commit
074d3b435a
  1. 1
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java
  2. 11
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

1
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java

@ -181,6 +181,7 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane {
wFitLayout.setBorderStyle(layout.getBorderStyle()); wFitLayout.setBorderStyle(layout.getBorderStyle());
} }
copyLayoutAttr(layout, xwFitLayout.toData()); copyLayoutAttr(layout, xwFitLayout.toData());
xwFitLayout.refreshStylePreviewEffect();
} }
} }
layout.setBorderStyleFollowingTheme(themePane.isFollowingTheme()); layout.setBorderStyleFollowingTheme(themePane.isFollowingTheme());

11
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

@ -42,6 +42,7 @@ import com.fr.log.FineLoggerFactory;
import com.fr.report.core.ReportUtils; import com.fr.report.core.ReportUtils;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.Border;
import java.awt.*; import java.awt.*;
/** /**
@ -243,6 +244,16 @@ public class FRFitLayoutDefinePane extends AbstractFRLayoutDefinePane<WFitLayout
FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner(); FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner();
formDesigner.getSelectionModel().setSelectedCreators( formDesigner.getSelectionModel().setSelectedCreators(
FormSelectionUtils.rebuildSelection(xWFitLayout, new Widget[]{wAbsoluteBodyLayout})); FormSelectionUtils.rebuildSelection(xWFitLayout, new Widget[]{wAbsoluteBodyLayout}));
if (xwAbsoluteBodyLayout.toData() != null) {
xwAbsoluteBodyLayout.toData().setBorderStyleFollowingTheme(wAbsoluteBodyLayout.isBorderStyleFollowingTheme());
xwAbsoluteBodyLayout.toData().setBorderStyle(wAbsoluteBodyLayout.getBorderStyle());
}
xwAbsoluteBodyLayout.refreshStylePreviewEffect();
if (xWFitLayout.toData() != null) {
xWFitLayout.toData().resetStyle();
}
xWFitLayout.refreshStylePreviewEffect();
} }
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);

Loading…
Cancel
Save