Browse Source

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

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

* commit '27f974c4886db1461a58047709f2d157ef223983':
  REPORT-71824 frm打开报表块编辑页面,切换工作目录无法打开当前frm
new-design
starryi 2 years ago
parent
commit
c4d8621212
  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() {
@Override
public void run() {
refreshDesignerFromResource();
}
});
}
protected void refreshDesignerFromResource() {
// 先移除旧的。
removeCenterPane();
// 加入新的
@ -508,9 +515,6 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView();
}
});
}
/**
* 刷新 模板资源 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.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