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

experimental
Maselbas 10 years ago
parent 97e1cf8cf3
commit 07fcde3b73
  1. 6
      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;
}
}
@ -99,7 +101,7 @@ public class DeleteShortcut extends ShortcutTool {
@Override
public void draggedSecondary(Vector2f screenCoord, boolean pressed, JmeNode rootNode, DataObject currentDataObject) {
}
private class DeleteUndo extends AbstractUndoableSceneEdit {
private Spatial spatial;

Loading…
Cancel
Save