|
|
|
@ -6,7 +6,6 @@ import com.fr.design.file.HistoryTemplateListCache;
|
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
|
import com.fr.design.mainframe.DesignerFrameFileDealerPane; |
|
|
|
|
import com.fr.design.mainframe.EastRegionContainerPane; |
|
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
|
import com.fr.design.worker.WorkerManager; |
|
|
|
|
import com.fr.exception.DecryptTemplateException; |
|
|
|
@ -99,11 +98,10 @@ public class OpenWorker<T> extends SwingWorker<T, Void> {
|
|
|
|
|
currentTemplate.whenClose(); |
|
|
|
|
DesignerContext.getDesignerFrame().addAndActivateJTemplate(book); |
|
|
|
|
HistoryTemplateListCache.getInstance().replaceCurrentEditingTemplate(book); |
|
|
|
|
EastRegionContainerPane.getInstance().updateAllPropertyPane(); |
|
|
|
|
} else { |
|
|
|
|
// 当前tab页是其他模板
|
|
|
|
|
for (int i = 0, len = HistoryTemplateListCache.getInstance().getHistoryCount(); i < len; i++) { |
|
|
|
|
JTemplate<?, ?> template = HistoryTemplateListCache.getInstance().get(i); |
|
|
|
|
JTemplate<?, ?> template = HistoryTemplateListCache.getInstance().getTemplate(i); |
|
|
|
|
if (ComparatorUtils.equals(template.getEditingFILE(), book.getEditingFILE())) { |
|
|
|
|
template.whenClose(); |
|
|
|
|
HistoryTemplateListCache.getInstance().getHistoryList().set(i, book); |
|
|
|
|