Browse Source

Merge pull request #9288 in DESIGN/design from release/11.0 to bugfix/11.0

* commit '5f7005e351a38d5300b9c210fefb9d0d5210a9ab':
  REPORT-71824 frm打开报表块编辑页面,切换工作目录无法打开当前frm
bugfix/11.0
superman 2 years ago
parent
commit
6a77859a81
  1. 20
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  2. 23
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java

20
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -499,19 +499,23 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
// 先移除旧的。
removeCenterPane();
// 加入新的
addCenterPane();
refreshToolArea();
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView();
refreshDesignerFromResource();
}
});
}
protected void refreshDesignerFromResource() {
// 先移除旧的。
removeCenterPane();
// 加入新的
addCenterPane();
refreshToolArea();
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView();
}
/**
* 刷新 模板资源 EditingFILE
* 仅在切换工作目录reload模板时使用

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

@ -70,6 +70,7 @@ import com.fr.design.parameter.ParameterPropertyPane;
import com.fr.design.preview.FormPreview;
import com.fr.design.preview.MobilePreview;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.gui.LayoutUtils;
import com.fr.file.FILE;
import com.fr.file.FILEChooserPane;
@ -380,6 +381,28 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
this.formDesign = formDesign;
}
@Override
protected void refreshDesignerFromResource() {
stopCreatorEditing();
super.refreshDesignerFromResource();
}
private void stopCreatorEditing() {
if (index == ELEMENTCASE_TAB) {
tabChanged(FORM_TAB);
} else if (index == FORM_TAB) {
TreePath[] treePaths = FormHierarchyTreePane.getInstance(formDesign).getComponentTree().getSelectedTreePath();
if (treePaths != null) {
for (TreePath path : treePaths) {
if (path != null) {
formDesign.stopEditing(path);
}
}
}
FormHierarchyTreePane.getInstance().refreshRoot();
}
}
/**
* 去除选择
*/

Loading…
Cancel
Save