IDEMPIERE-5803 - Toolbar does not check if overlapped widow is closing with shortcut (#1997)

This commit is contained in:
Peter Takács 2023-09-13 06:51:22 +02:00 committed by GitHub
parent 39d159d44a
commit 826b47d6a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -594,8 +594,11 @@ public class ADWindowToolbar extends ToolBar implements EventListener<Event>
doOnClick(event);
}
else if(IDesktop.ON_CLOSE_WINDOW_SHORTCUT_EVENT.equals(eventName)) {
if (windowNo > 0)
SessionManager.getAppDesktop().closeWindow(windowNo);
IDesktop desktop = SessionManager.getAppDesktop();
if (windowNo > 0 && desktop.isCloseTabWithShortcut())
desktop.closeWindow(windowNo);
else
desktop.setCloseTabWithShortcut(true);
}
}