revert some changes in MoveTool

experimental
Maselbas 10 years ago
parent 5ef1292484
commit 0d95422d53
  1. 29
      sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/tools/MoveTool.java

@ -47,7 +47,16 @@ public class MoveTool extends SceneEditTool {
@Override @Override
public void actionPrimary(Vector2f screenCoord, boolean pressed, JmeNode rootNode, DataObject dataObject) { public void actionPrimary(Vector2f screenCoord, boolean pressed, JmeNode rootNode, DataObject dataObject) {
onPrimary(screenCoord, pressed); if (!pressed) {
setDefaultAxisMarkerColors();
pickedMarker = null; // mouse released, reset selection
constraintAxis = Vector3f.UNIT_XYZ; // no constraint
if (wasDragging) {
actionPerformed(moveManager.makeUndo());
wasDragging = false;
}
moveManager.reset();
}
} }
@Override @Override
@ -67,20 +76,6 @@ public class MoveTool extends SceneEditTool {
@Override @Override
public void draggedPrimary(Vector2f screenCoord, boolean pressed, JmeNode rootNode, DataObject currentDataObject) { public void draggedPrimary(Vector2f screenCoord, boolean pressed, JmeNode rootNode, DataObject currentDataObject) {
onPrimary(screenCoord, pressed);
}
@Override
public void draggedSecondary(Vector2f screenCoord, boolean pressed, JmeNode rootNode, DataObject currentDataObject) {
}
/**
* Called by ActionPrimary and draggedPrimay, improve user feedback
*
* @param screenCoord
* @param pressed
*/
private void onPrimary(Vector2f screenCoord, boolean pressed) {
if (!pressed) { if (!pressed) {
setDefaultAxisMarkerColors(); setDefaultAxisMarkerColors();
pickedMarker = null; // mouse released, reset selection pickedMarker = null; // mouse released, reset selection
@ -127,4 +122,8 @@ public class MoveTool extends SceneEditTool {
wasDragging = true; wasDragging = true;
} }
@Override
public void draggedSecondary(Vector2f screenCoord, boolean pressed, JmeNode rootNode, DataObject currentDataObject) {
}
} }

Loading…
Cancel
Save