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
release/11.0
starryi 2 years ago
parent
commit
5f7005e351
  1. 10
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  2. 23
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java

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

@ -499,6 +499,13 @@ 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();
}
});
}
protected void refreshDesignerFromResource() {
// 先移除旧的。 // 先移除旧的。
removeCenterPane(); removeCenterPane();
// 加入新的 // 加入新的
@ -508,9 +515,6 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView(); TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView();
} }
});
}
/** /**
* 刷新 模板资源 EditingFILE * 刷新 模板资源 EditingFILE

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