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

experimental
Maselbas 10 years ago
parent 97e1cf8cf3
commit 07fcde3b73
  1. 4
      sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/shortcuts/DeleteShortcut.java

@ -29,7 +29,9 @@ public class DeleteShortcut extends ShortcutTool {
@Override
public boolean isActivableBy(KeyInputEvent kie) {
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;
}
}

Loading…
Cancel
Save