Changeset 5991 in josm for trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
- Timestamp:
- 2013-06-06T01:48:06+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r5909 r5991 711 711 startEN = currentEN; // drag can continue after scaling/rotation 712 712 713 if (mode != Mode.rotate && mode != Mode.scale) { 714 return false; 715 } 716 717 getCurrentDataSet().beginUpdate(); 718 713 719 if (mode == Mode.rotate) { 714 getCurrentDataSet().beginUpdate();715 720 if (c instanceof RotateCommand && affectedNodes.equals(((RotateCommand) c).getTransformedNodes())) { 716 721 ((RotateCommand) c).handleEvent(currentEN); … … 719 724 } 720 725 } else if (mode == Mode.scale) { 721 getCurrentDataSet().beginUpdate();722 726 if (c instanceof ScaleCommand && affectedNodes.equals(((ScaleCommand) c).getTransformedNodes())) { 723 727 ((ScaleCommand) c).handleEvent(currentEN); … … 725 729 Main.main.undoRedo.add(new ScaleCommand(selection, currentEN)); 726 730 } 727 } else { 728 return false; 731 } 732 733 Collection<Way> ways = getCurrentDataSet().getSelectedWays(); 734 if (doesImpactStatusLine(affectedNodes, ways)) { 735 Main.map.statusLine.setDist(ways); 729 736 } 730 737 } 731 738 getCurrentDataSet().endUpdate(); 732 739 return true; 740 } 741 742 private boolean doesImpactStatusLine(Collection<Node> affectedNodes, Collection<Way> selectedWays) { 743 for (Way w : selectedWays) { 744 for (Node n : w.getNodes()) { 745 if (affectedNodes.contains(n)) { 746 return true; 747 } 748 } 749 } 750 return false; 733 751 } 734 752
Note:
See TracChangeset
for help on using the changeset viewer.