mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-02 19:27:57 +08:00
Ctrl+Enter shortcut doesn't call controller.commitAndClose as it should #PL-2205
This commit is contained in:
parent
82c935585f
commit
52bbcf8a90
@ -802,17 +802,6 @@ public class DesktopWindow implements Window, Component.Disposable,
|
||||
|
||||
public static class Editor extends DesktopWindow implements Window.Editor {
|
||||
|
||||
public Editor() {
|
||||
super();
|
||||
addAction(new AbstractShortcutAction("commitAndCloseAction",
|
||||
new ShortcutAction.KeyCombination(ShortcutAction.Key.ENTER, ShortcutAction.Modifier.CTRL)) {
|
||||
@Override
|
||||
public void actionPerform(com.haulmont.cuba.gui.components.Component component) {
|
||||
commitAndClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected WindowDelegate createDelegate() {
|
||||
return new EditorWindowDelegate(this);
|
||||
|
@ -82,6 +82,16 @@ public class EditorWindowDelegate extends WindowDelegate {
|
||||
}
|
||||
);
|
||||
|
||||
this.window.addAction(new AbstractShortcutAction("commitAndCloseShortcutAction",
|
||||
new ShortcutAction.KeyCombination(ShortcutAction.Key.ENTER, ShortcutAction.Modifier.CTRL)) {
|
||||
|
||||
@Override
|
||||
public void actionPerform(com.haulmont.cuba.gui.components.Component component) {
|
||||
editor.commitAndClose();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.window.addAction(
|
||||
new AbstractAction(Window.Editor.WINDOW_CLOSE) {
|
||||
@Override
|
||||
|
@ -818,17 +818,6 @@ public class WebWindow implements Window, Component.Wrapper,
|
||||
|
||||
public static class Editor extends WebWindow implements Window.Editor {
|
||||
|
||||
public Editor() {
|
||||
super();
|
||||
addAction(new AbstractShortcutAction("commitAndCloseAction",
|
||||
new ShortcutAction.KeyCombination(ShortcutAction.Key.ENTER, ShortcutAction.Modifier.CTRL)) {
|
||||
@Override
|
||||
public void actionPerform(com.haulmont.cuba.gui.components.Component component) {
|
||||
commitAndClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected WindowDelegate createDelegate() {
|
||||
return new EditorWindowDelegate(this);
|
||||
|
Loading…
Reference in New Issue
Block a user