From 1a7bf4bfe0e50341a6451afee254b166ad31d790 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 17 Jul 2020 11:02:23 +0800 Subject: [PATCH] REPORT-35108 && REPORT-34895 --- .../fr/design/actions/file/OpenRecentReportMenuDef.java | 9 ++++++++- .../write/submit/SmartInsertDBManipulationPane.java | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/OpenRecentReportMenuDef.java b/designer-base/src/main/java/com/fr/design/actions/file/OpenRecentReportMenuDef.java index 2bb026159f..7533cb133a 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/OpenRecentReportMenuDef.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/OpenRecentReportMenuDef.java @@ -1,6 +1,7 @@ package com.fr.design.actions.file; import java.awt.event.ActionEvent; +import java.io.File; import java.util.List; import com.fr.base.BaseUtils; @@ -11,6 +12,7 @@ import com.fr.design.mainframe.DesignerContext; import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.MenuDef; import com.fr.file.FILEFactory; +import com.fr.file.FileFILE; /** * Open Resent MenuDef. @@ -68,7 +70,12 @@ public class OpenRecentReportMenuDef extends MenuDef { * @param e 事件 */ public void actionPerformed(ActionEvent e) { - DesignerContext.getDesignerFrame().openTemplate(FILEFactory.createFILE(this.getPath())); + File file = new File(this.getPath()); + if (file.exists()) { + DesignerContext.getDesignerFrame().openTemplate(new FileFILE(file)); + } else { + DesignerContext.getDesignerFrame().openTemplate(FILEFactory.createFILE(this.getPath())); + } } public String getPath() { diff --git a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java index 37d6a639f3..a430faeec1 100644 --- a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java +++ b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java @@ -238,6 +238,7 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { dlg.setModal(false); dlg.setVisible(true); + dlg.setAlwaysOnTop(true); } private void showDialogAfterAddCellAction() {