Browse Source

REPORT-19083 设计器内删除当前模板时,未自动退回到最后一张已打开的模板

feature/big-screen
Hades 5 years ago
parent
commit
3f1d3cf1e0
  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();
String tPath = template.getPath();
if (isDir ? tPath.startsWith(path) : tPath.equals(path)) {
int size = getHistoryCount();
iterator.remove();
int index = iterator.nextIndex();
int size = getHistoryCount();
if (size == index + 1 && index > 0) {
//如果删除的是后一个Tab,则定位到前一个
MutilTempalteTabPane.getInstance().setSelectedIndex(index - 1);

Loading…
Cancel
Save