Browse Source

REPORT-14835 调整代码

research/10.0
XiaXiang 6 years ago
parent
commit
06128b9088
  1. 6
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionCellEditor.java

6
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -302,13 +302,13 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
}
// 如果模板已经打开了,关掉,避免出现2个同名tab(1个是模板,1个是版本)
closeOpendTemplate(path, isCurrentEditing);
closeOpenedTemplate(path, isCurrentEditing);
FileVersionsPanel fileVersionTablePanel = FileVersionsPanel.getInstance();
fileVersionTablePanel.showFileVersionsPane();
}
private void closeOpendTemplate(String path, boolean isCurrentEditing) {
for (JTemplate<?, ?> jTemplate : HistoryTemplateListCache.getInstance().getHistoryList()) {
private void closeOpenedTemplate(String path, boolean isCurrentEditing) {
for (JTemplate jTemplate : HistoryTemplateListCache.getInstance().getHistoryList()) {
if (ComparatorUtils.equals(jTemplate.getEditingFILE().getPath(), path)) {
if (isCurrentEditing) {
MutilTempalteTabPane.getInstance().setIsCloseCurrent(true);

2
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionCellEditor.java

@ -50,7 +50,7 @@ public class FileVersionCellEditor extends AbstractCellEditor implements TableCe
editor.setBackground(VcsHelper.TABLE_SELECT_BACKGROUND);
if (StringUtils.isNotEmpty(fileOfVersion)) {
//先关闭当前打开的模板版本
JTemplate<?, ?> jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
JTemplate jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
jt.stopEditing();
MutilTempalteTabPane.getInstance().setIsCloseCurrent(true);
MutilTempalteTabPane.getInstance().closeFormat(jt);

Loading…
Cancel
Save