SDK SceneComposer : the DeleteShortcut cannot be activated if an other shortcut is already active
This commit is contained in:
parent
97e1cf8cf3
commit
07fcde3b73
@ -29,7 +29,9 @@ public class DeleteShortcut extends ShortcutTool {
|
|||||||
@Override
|
@Override
|
||||||
public boolean isActivableBy(KeyInputEvent kie) {
|
public boolean isActivableBy(KeyInputEvent kie) {
|
||||||
if (kie.getKeyCode() == KeyInput.KEY_X && kie.isPressed()) {
|
if (kie.getKeyCode() == KeyInput.KEY_X && kie.isPressed()) {
|
||||||
if (Lookup.getDefault().lookup(ShortcutManager.class).isShiftDown()) {
|
ShortcutManager scm = Lookup.getDefault().lookup(ShortcutManager.class);
|
||||||
|
if (!scm.isActive() && scm.isShiftDown()) {
|
||||||
|
// ^ can't be enable if an other shortcut is allready active
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user