Browse Source

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

Merge in DESIGN/design from ~DESTINY.LIN/design:feature/x to feature/x

* commit 'e099b5f3e0c7ad90cf3d3a40470b9ecb5b1dbdfd':
  REPORT-91743 设计器通过关闭模板A的方式触发保存,设计器页面显示还是模板A的内容
  REPORT-91743 设计器通过关闭模板A的方式触发保存,设计器页面显示还是模板A的内容
feature/x
Destiny.Lin-林锦龙 2 years ago
parent
commit
332fd52ea5
  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; return;
} }
} }
//参考CloseCurrentTemplateAction,在closeFormat与closeSpecifiedTemplate之前要先设定isCloseCurrent,这样关闭之后才会自动切换tab
if (checkCurrentClose(template)) {
setIsCloseCurrent(true);
}
closeFormat(template); closeFormat(template);
closeSpecifiedTemplate(template); closeSpecifiedTemplate(template);
DesignerContext.getDesignerFrame().getContentFrame().repaint(); DesignerContext.getDesignerFrame().getContentFrame().repaint();
@ -1204,6 +1208,11 @@ public class MultiTemplateTabPane extends JComponent {
} }
private boolean checkCurrentClose(JTemplate template) {
JTemplate currentTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
return JTemplate.isValid(currentTemplate) && ComparatorUtils.equals(template.getPath(), currentTemplate.getPath());
}
private class MultiTemplateTabMouseMotionListener implements MouseMotionListener { private class MultiTemplateTabMouseMotionListener implements MouseMotionListener {
/** /**
* 鼠标拖拽 * 鼠标拖拽

Loading…
Cancel
Save