Browse Source

REPORT-91743 设计器通过关闭模板A的方式触发保存,设计器页面显示还是模板A的内容

feature/x
Destiny.Lin 2 years ago
parent
commit
b230f5ad1c
  1. 9
      designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java

9
designer-base/src/main/java/com/fr/design/file/MultiTemplateTabPane.java

@ -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 {
/**
* 鼠标拖拽

Loading…
Cancel
Save