Browse Source

REPORT-58902 【主题切换】打开frm模板的时候编辑cpt的主题,保存后右侧面板显示的是单元格的样式

【问题原因】
仅当前正在编辑模版所使用的主题发生变化才需要重绘
设计器画布及属性面板等 

【改动思路】
同上
fix-lag
Starryi 3 years ago
parent
commit
c093b92a20
  1. 31
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  2. 11
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

31
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -39,6 +39,7 @@ import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.designer.properties.FormWidgetAuthorityEditPane;
import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.fun.FormAdaptiveConfigUIProcessor;
import com.fr.design.fun.PreviewProvider;
import com.fr.design.fun.PropertyItemPaneProvider;
@ -1199,24 +1200,26 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
getTarget().setTemplateTheme(newTheme, compatible);
fireTargetModified(shouldCreateUndoState);
formDesign.refreshRoot();
// 刷新界面后恢复原来的尺寸
formDesign.getArea().setAreaSize(areaSize, horizontalValue, verticalValue, widthValue, heightValue, slideValue);
if (this.index != FORM_TAB) {
refreshToolArea();
} else {
// CHART-20568: 当图表块处于编辑状态时,任何界面内容的修改都会导致其进行截图操作,进而引起设计器界面再次重绘,导致死循环,因而需要停止编辑 恢复浮层展示
TreePath[] treePaths = FormHierarchyTreePane.getInstance(formDesign).getComponentTree().getSelectedTreePath();
if (treePaths != null) {
for (TreePath path : treePaths) {
if (path != null) {
formDesign.stopEditing(path);
if (HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() == this) {
fireTargetModified(shouldCreateUndoState);
formDesign.refreshRoot();
// 刷新界面后恢复原来的尺寸
formDesign.getArea().setAreaSize(areaSize, horizontalValue, verticalValue, widthValue, heightValue, slideValue);
if (this.index != FORM_TAB) {
refreshToolArea();
} else {
// CHART-20568: 当图表块处于编辑状态时,任何界面内容的修改都会导致其进行截图操作,进而引起设计器界面再次重绘,导致死循环,因而需要停止编辑 恢复浮层展示
TreePath[] treePaths = FormHierarchyTreePane.getInstance(formDesign).getComponentTree().getSelectedTreePath();
if (treePaths != null) {
for (TreePath path : treePaths) {
if (path != null) {
formDesign.stopEditing(path);
}
}
}
}
FormHierarchyTreePane.getInstance().refreshRoot();
}
FormHierarchyTreePane.getInstance().refreshRoot();
super.setTemplateTheme(newTheme, compatible);
}

11
designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

@ -37,6 +37,7 @@ import com.fr.design.constants.UIConstants;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.designer.TargetComponent;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.file.MutilTempalteTabPane;
import com.fr.design.fun.PreviewProvider;
@ -1295,10 +1296,12 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
getTarget().setTemplateTheme(newTheme, compatible);
fireTargetModified(shouldCreateUndoState);
reportComposite.setSelectedIndex(reportComposite.getSelectedIndex());
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView();
DesignerContext.getDesignerFrame().resetToolkitByPlus(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate());
if (HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() == this) {
fireTargetModified(shouldCreateUndoState);
reportComposite.setSelectedIndex(reportComposite.getSelectedIndex());
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView();
DesignerContext.getDesignerFrame().resetToolkitByPlus(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate());
}
super.setTemplateTheme(newTheme, compatible);
}

Loading…
Cancel
Save