Changeset 1225
- Timestamp:
- 02/20/10 16:13:37 (5 months ago)
- Files:
-
- trunk/Moonlight/src/eu/moonlight3d/ml3d/modelling/objects/DeleteObjectsCommand.java (modified) (3 diffs)
- trunk/Moonlight/src/eu/moonlight3d/ml3d/modelling/objects/DuplicateObjectsCommand.java (modified) (3 diffs)
- trunk/Moonlight/src/eu/moonlight3d/ml3d/modelling/objects/GroupObjectsCommand.java (modified) (3 diffs)
- trunk/Moonlight/src/eu/moonlight3d/ml3d/modelling/objects/MoveObjectCommand.java (modified) (3 diffs)
- trunk/Moonlight/src/eu/moonlight3d/ml3d/modelling/objects/RotateObjectCommand.java (modified) (3 diffs)
- trunk/Moonlight/src/eu/moonlight3d/ml3d/modelling/objects/ScaleObjectCommand.java (modified) (4 diffs)
- trunk/Moonlight/src/eu/moonlight3d/ml3d/modelling/objects/UngroupObjectsCommand.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Moonlight/src/eu/moonlight3d/ml3d/modelling/objects/DeleteObjectsCommand.java
r1216 r1225 36 36 import eu.moonlight3d.ml3d.backend.threedim.og.Node; 37 37 import eu.moonlight3d.ml3d.backend.threedim.og.Slot; 38 import eu.moonlight3d.ml3d.ui.command.CommandBase; 38 39 39 public class DeleteObjectsCommand implements Command {40 public class DeleteObjectsCommand extends CommandBase implements Command { 40 41 private String previousOGNodeName; 41 42 private String previousSlotName; … … 89 90 public void redo() { 90 91 try { 92 saveOldSelection(); 93 91 94 State state=State.getInstance(); 92 95 … … 115 118 OperatorGraphHelper.removeAndBridge(deleteObjectsNodeName); 116 119 } 120 restoreOldSelection(); 117 121 ogManager.update(); 118 122 } catch (Exception e) { trunk/Moonlight/src/eu/moonlight3d/ml3d/modelling/objects/DuplicateObjectsCommand.java
r1216 r1225 37 37 import eu.moonlight3d.ml3d.backend.threedim.og.Node; 38 38 import eu.moonlight3d.ml3d.backend.threedim.og.Slot; 39 import eu.moonlight3d.ml3d.ui.command.CommandBase; 39 40 40 public class DuplicateObjectsCommand implements Command {41 public class DuplicateObjectsCommand extends CommandBase implements Command { 41 42 private int numCopies; 42 43 private boolean copyChildren; … … 94 95 public void redo() { 95 96 try { 97 saveOldSelection(); 98 96 99 State state=State.getInstance(); 97 100 … … 126 129 OperatorGraphHelper.removeAndBridge(duplicateObjectsNodeName); 127 130 } 131 restoreOldSelection(); 128 132 ogManager.update(); 129 133 } catch (Exception e) { trunk/Moonlight/src/eu/moonlight3d/ml3d/modelling/objects/GroupObjectsCommand.java
r1216 r1225 38 38 import eu.moonlight3d.ml3d.backend.threedim.og.Slot; 39 39 import eu.moonlight3d.ml3d.modelling.basic.OGOutputMerger; 40 import eu.moonlight3d.ml3d.ui.command.CommandBase; 40 41 41 public class GroupObjectsCommand implements Command {42 public class GroupObjectsCommand extends CommandBase implements Command { 42 43 private ArrayList<String> inputPaths; 43 44 private List<String> mergeNodeNames; … … 85 86 public void redo() { 86 87 try { 88 saveOldSelection(); 89 87 90 State state=State.getInstance(); 88 91 … … 145 148 } 146 149 } 150 restoreOldSelection(); 147 151 ogManager.update(); 148 152 } catch (Exception e) { trunk/Moonlight/src/eu/moonlight3d/ml3d/modelling/objects/MoveObjectCommand.java
r1218 r1225 35 35 import eu.moonlight3d.ml3d.backend.threedim.og.Manager; 36 36 import eu.moonlight3d.ml3d.backend.threedim.og.Node; 37 import eu.moonlight3d.ml3d.ui.command.CommandBase; 37 38 38 public class MoveObjectCommand implements Command {39 public class MoveObjectCommand extends CommandBase implements Command { 39 40 private String selectionName; 40 41 private Vector3D oldDisplacement; … … 82 83 public void redo() { 83 84 try { 85 saveOldSelection(); 86 84 87 Manager ogManager=((Document) State.getInstance().getDocumentManager().getMainDocument()).getOGManager(); 85 88 Selection selection = ((Document) State.getInstance().getDocumentManager().getMainDocument()).getSelectionManager().getSelection("viewSelection"); … … 125 128 currentOperation.getProperty("displacement").setValue(new Vector3DValue(oldDisplacement)); 126 129 } 130 restoreOldSelection(); 127 131 ogManager.update(); 128 132 } catch(Exception e) { trunk/Moonlight/src/eu/moonlight3d/ml3d/modelling/objects/RotateObjectCommand.java
r1218 r1225 36 36 import eu.moonlight3d.ml3d.backend.threedim.og.Manager; 37 37 import eu.moonlight3d.ml3d.backend.threedim.og.Node; 38 import eu.moonlight3d.ml3d.ui.command.CommandBase; 38 39 39 public class RotateObjectCommand implements Command {40 public class RotateObjectCommand extends CommandBase implements Command { 40 41 private String selectionName; 41 42 private Vector3D oldPivot; … … 94 95 public void redo() { 95 96 try { 97 saveOldSelection(); 98 96 99 Manager ogManager=((Document) State.getInstance().getDocumentManager().getMainDocument()).getOGManager(); 97 100 Selection selection = ((Document) State.getInstance().getDocumentManager().getMainDocument()).getSelectionManager().getSelection("viewSelection"); … … 142 145 currentOperation.getProperty("angle").setValue(new FloatValue(oldAngle)); 143 146 } 147 restoreOldSelection(); 144 148 ogManager.update(); 145 149 } catch(Exception e) { trunk/Moonlight/src/eu/moonlight3d/ml3d/modelling/objects/ScaleObjectCommand.java
r1218 r1225 35 35 import eu.moonlight3d.ml3d.backend.threedim.og.Manager; 36 36 import eu.moonlight3d.ml3d.backend.threedim.og.Node; 37 import eu.moonlight3d.ml3d.ui.command.CommandBase; 37 38 38 public class ScaleObjectCommand implements Command {39 public class ScaleObjectCommand extends CommandBase implements Command { 39 40 private String selectionName; 40 41 private Vector3D oldPivot; … … 88 89 public void redo() { 89 90 try { 91 saveOldSelection(); 92 90 93 Manager ogManager=((Document) State.getInstance().getDocumentManager().getMainDocument()).getOGManager(); 91 94 Selection selection = ((Document) State.getInstance().getDocumentManager().getMainDocument()).getSelectionManager().getSelection("viewSelection"); … … 130 133 OperatorGraphHelper.removeAndBridge(scaleObjectNodeName); 131 134 } 132 ogManager.removeNode(currentOperation);133 135 } else { 134 136 currentOperation.getProperty("pivot").setValue(new Vector3DValue(oldPivot)); … … 149 151 currentOperation.getProperty("pivot").setValue(new Vector3DValue(newPivot)); 150 152 currentOperation.getProperty("scale").setValue(new Vector3DValue(newScale)); 153 restoreOldSelection(); 151 154 ogManager.update(); 152 155 } catch(Exception e) { trunk/Moonlight/src/eu/moonlight3d/ml3d/modelling/objects/UngroupObjectsCommand.java
r1216 r1225 35 35 import eu.moonlight3d.ml3d.backend.threedim.og.Node; 36 36 import eu.moonlight3d.ml3d.backend.threedim.og.Slot; 37 import eu.moonlight3d.ml3d.ui.command.CommandBase; 37 38 38 public class UngroupObjectsCommand implements Command {39 public class UngroupObjectsCommand extends CommandBase implements Command { 39 40 private boolean keepTransformation; 40 41 private String previousOGNodeName; … … 85 86 public void redo() { 86 87 try { 88 saveOldSelection(); 89 87 90 State state=State.getInstance(); 88 91 … … 116 119 OperatorGraphHelper.removeAndBridge(ungroupObjectsNodeName); 117 120 } 121 restoreOldSelection(); 118 122 ogManager.update(); 119 123 } catch (Exception e) {
