Browse Source

Merge pull request #987 in DESIGN/design from ~HADES/design:release/10.0 to release/10.0

* commit '3f1d3cf1e099cddec4f5d96612b739c7bc4607bd':
  REPORT-19083 设计器内删除当前模板时,未自动退回到最后一张已打开的模板
feature/big-screen
Hades 5 years ago
parent
commit
0506d68d93
  1. 2
      designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java

2
designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java

@ -263,9 +263,9 @@ public class HistoryTemplateListCache implements CallbackEvent {
JTemplate<?, ?> template = iterator.next(); JTemplate<?, ?> template = iterator.next();
String tPath = template.getPath(); String tPath = template.getPath();
if (isDir ? tPath.startsWith(path) : tPath.equals(path)) { if (isDir ? tPath.startsWith(path) : tPath.equals(path)) {
int size = getHistoryCount();
iterator.remove(); iterator.remove();
int index = iterator.nextIndex(); int index = iterator.nextIndex();
int size = getHistoryCount();
if (size == index + 1 && index > 0) { if (size == index + 1 && index > 0) {
//如果删除的是后一个Tab,则定位到前一个 //如果删除的是后一个Tab,则定位到前一个
MutilTempalteTabPane.getInstance().setSelectedIndex(index - 1); MutilTempalteTabPane.getInstance().setSelectedIndex(index - 1);

Loading…
Cancel
Save