Browse Source

Pull request #9266: REPORT-71824 frm打开报表块编辑页面,切换工作目录无法打开当前frm

Merge in DESIGN/design from ~STARRYI/design:release/11.0 to release/11.0

* commit '3702339dfce6ec87c559dffe52118faac43977fb':
  REPORT-71824 frm打开报表块编辑页面,切换工作目录无法打开当前frm
newui
starryi 2 years ago
parent
commit
5f7005e351
  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() { UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override @Override
public void run() { public void run() {
// 先移除旧的。 refreshDesignerFromResource();
removeCenterPane();
// 加入新的
addCenterPane();
refreshToolArea();
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView();
} }
}); });
} }
protected void refreshDesignerFromResource() {
// 先移除旧的。
removeCenterPane();
// 加入新的
addCenterPane();
refreshToolArea();
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView();
}
/** /**
* 刷新 模板资源 EditingFILE * 刷新 模板资源 EditingFILE
* 仅在切换工作目录reload模板时使用 * 仅在切换工作目录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.FormPreview;
import com.fr.design.preview.MobilePreview; import com.fr.design.preview.MobilePreview;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.gui.LayoutUtils; import com.fr.design.utils.gui.LayoutUtils;
import com.fr.file.FILE; import com.fr.file.FILE;
import com.fr.file.FILEChooserPane; import com.fr.file.FILEChooserPane;
@ -380,6 +381,28 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
this.formDesign = formDesign; 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