SDK SceneComposer : the DeleteShortcut cannot be activated if an other shortcut is already active

This commit is contained in:
Maselbas 2015-05-16 22:41:30 +02:00
parent 97e1cf8cf3
commit 07fcde3b73

View File

@ -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;
} }
} }