Changeset 5653 in josm
- Timestamp:
- 2012-12-31T14:41:24+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r5447 r5653 674 674 Command c = getLastCommand(); 675 675 if (mode == Mode.move) { 676 if (startEN == null) return false; // fix #8128 676 677 getCurrentDataSet().beginUpdate(); 677 678 if (c instanceof MoveCommand && affectedNodes.equals(((MoveCommand) c).getParticipatingPrimitives())) { … … 686 687 // Revert move 687 688 ((MoveCommand) c).resetToCheckpoint(); 689 getCurrentDataSet().endUpdate(); 688 690 JOptionPane.showMessageDialog( 689 691 Main.parent, … … 695 697 } 696 698 } 697 getCurrentDataSet().endUpdate(); 698 return true; 699 } 700 701 startEN = currentEN; // drag can continue after scaling/rotation 702 703 if (mode == Mode.rotate) { 704 getCurrentDataSet().beginUpdate(); 705 if (c instanceof RotateCommand && affectedNodes.equals(((RotateCommand) c).getTransformedNodes())) { 706 ((RotateCommand) c).handleEvent(currentEN); 699 } else { 700 startEN = currentEN; // drag can continue after scaling/rotation 701 702 if (mode == Mode.rotate) { 703 getCurrentDataSet().beginUpdate(); 704 if (c instanceof RotateCommand && affectedNodes.equals(((RotateCommand) c).getTransformedNodes())) { 705 ((RotateCommand) c).handleEvent(currentEN); 706 } else { 707 Main.main.undoRedo.add(new RotateCommand(selection, currentEN)); 708 } 709 } else if (mode == Mode.scale) { 710 getCurrentDataSet().beginUpdate(); 711 if (c instanceof ScaleCommand && affectedNodes.equals(((ScaleCommand) c).getTransformedNodes())) { 712 ((ScaleCommand) c).handleEvent(currentEN); 713 } else { 714 Main.main.undoRedo.add(new ScaleCommand(selection, currentEN)); 715 } 707 716 } else { 708 Main.main.undoRedo.add(new RotateCommand(selection, currentEN)); 709 } 710 getCurrentDataSet().endUpdate(); 711 } else if (mode == Mode.scale) { 712 getCurrentDataSet().beginUpdate(); 713 if (c instanceof ScaleCommand && affectedNodes.equals(((ScaleCommand) c).getTransformedNodes())) { 714 ((ScaleCommand) c).handleEvent(currentEN); 715 } else { 716 Main.main.undoRedo.add(new ScaleCommand(selection, currentEN)); 717 } 718 getCurrentDataSet().endUpdate(); 719 } 717 return false; 718 } 719 } 720 getCurrentDataSet().endUpdate(); 720 721 return true; 721 722 }
Note:
See TracChangeset
for help on using the changeset viewer.