- Timestamp:
- 2014-06-14T08:31:19+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
r7232 r7247 22 22 import java.awt.geom.Point2D; 23 23 import java.util.ArrayList; 24 import java.util.Arrays;25 24 import java.util.Collection; 26 25 import java.util.LinkedList; … … 56 55 import org.openstreetmap.josm.tools.ImageProvider; 57 56 import org.openstreetmap.josm.tools.Shortcut; 58 import org.openstreetmap.josm.tools.Utils;59 57 60 58 /** … … 180 178 private ReferenceSegment dualAlignSegment1, dualAlignSegment2; 181 179 /** {@code true}, if new segment was collapsed */ 182 private boolean dualAlignSegmentCollapsed ;180 private boolean dualAlignSegmentCollapsed = false; 183 181 // Dual alignment UI stuff 184 182 private final DualAlignChangeAction dualAlignChangeAction; … … 548 546 moveCommand = null; 549 547 mode = Mode.select; 548 dualAlignSegmentCollapsed = false; 550 549 updateStatusLine(); 551 550 Main.map.mapView.repaint(); … … 590 589 wnew.addNode(selectedSegment.getSecondNode()); 591 590 wnew.addNode(third); 592 if (newN1en.distance(newN2en)>1e-6) { 593 wnew.addNode(fourth); // rectangle can degrade to triangle for dual alignment 591 if (!dualAlignSegmentCollapsed) { 592 // rectangle can degrade to triangle for dual alignment after collapsing 593 wnew.addNode(fourth); 594 594 } 595 595 // ... and close the way … … 597 597 // undo support 598 598 cmds.add(new AddCommand(third)); 599 cmds.add(new AddCommand(fourth)); 599 if (!dualAlignSegmentCollapsed) { 600 cmds.add(new AddCommand(fourth)); 601 } 600 602 cmds.add(new AddCommand(wnew)); 601 603 Command c = new SequenceCommand(tr("Extrude Way"), cmds);
Note:
See TracChangeset
for help on using the changeset viewer.