Browse Source

Merge pull request #241 in DESIGN/design from ~XIAOXIA/design-10:release/10.0 to release/10.0

* commit '3c908ba98563d184b37b9018d48a8a43b363775b':
  rtREPORT-9747 【10.0二轮回归】修改以前的模板无法更改
  rt
  rtREPORT-9747 【10.0二轮回归】修改以前的模板无法更改
  REPORT-9747 【10.0二轮回归】修改以前的模板无法更改
master
xiaoxia 7 years ago
parent
commit
a3b92ff656
  1. 11
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  2. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/FileModel.java

11
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -1009,16 +1009,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
*/
private void activeTemplate(FILE tplFile, JTemplate jt) {
// 如果该模板已经打开,则进行激活就可以了
String fullName = StableUtils.pathJoin(new String[]{ProjectConstants.REPORTLETS_NAME, tplFile.getName()});
if (tplFile instanceof FileNodeFILE) {
fullName = ((FileNodeFILE) tplFile).getEnvPath() + "/" + tplFile.getPath();
}
// 如果是从文件夹打开的文件,不是从设计器文件树打开的文件,则直接取path就行
if (tplFile instanceof FileFILE) {
fullName = tplFile.getPath();
}
fullName = OperatingSystem.isWindows() ? fullName.replaceAll("/", "\\\\") : fullName.replaceAll("\\\\", "/");
int index = HistoryTemplateListPane.getInstance().contains(fullName);
int index = HistoryTemplateListPane.getInstance().contains(tplFile.getPath());
List<JTemplate<?, ?>> historyList = HistoryTemplateListPane.getInstance().getHistoryList();
if (index != -1) {
historyList.get(index).activeJTemplate(index, jt);

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/FileModel.java

@ -22,8 +22,8 @@ public class FileModel extends AlphaCellModel {
public FileModel(String name, String filePath) {
super(name, null, CellType.FILE);
this.filePath = filePath;
setDescription(AlphaFineHelper.findFolderName(filePath));
this.filePath = filePath.replaceAll("\\\\", "/");
setDescription(AlphaFineHelper.findFolderName(this.filePath));
}
public String getFilePath() {

Loading…
Cancel
Save