|
|
|
@ -1171,6 +1171,10 @@ public class MultiTemplateTabPane extends JComponent {
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//参考CloseCurrentTemplateAction,在closeFormat与closeSpecifiedTemplate之前要先设定isCloseCurrent,这样关闭之后才会自动切换tab
|
|
|
|
|
if (checkCurrentClose(template)) { |
|
|
|
|
setIsCloseCurrent(true); |
|
|
|
|
} |
|
|
|
|
closeFormat(template); |
|
|
|
|
closeSpecifiedTemplate(template); |
|
|
|
|
DesignerContext.getDesignerFrame().getContentFrame().repaint(); |
|
|
|
@ -1204,6 +1208,11 @@ public class MultiTemplateTabPane extends JComponent {
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean checkCurrentClose(JTemplate template) { |
|
|
|
|
JTemplate currentTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); |
|
|
|
|
return currentTemplate != null && ComparatorUtils.equals(template.getPath(), currentTemplate.getPath()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private class MultiTemplateTabMouseMotionListener implements MouseMotionListener { |
|
|
|
|
/** |
|
|
|
|
* 鼠标拖拽 |
|
|
|
|