Changeset 729 in josm
- Timestamp:
- 2008-07-18T22:55:11+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 7 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java
r627 r729 16 16 import org.openstreetmap.josm.command.Command; 17 17 import org.openstreetmap.josm.command.SequenceCommand; 18 import org.openstreetmap.josm.corrector.ReverseWayTagCorrector; 18 19 import org.openstreetmap.josm.data.osm.Relation; 19 20 import org.openstreetmap.josm.data.osm.Node; … … 47 48 return; 48 49 } 49 Collection<Command> c = new LinkedList<Command>(); 50 for (Way w : sel) { 51 Way wnew = new Way(w); 50 51 boolean propertiesUpdated = false; 52 ReverseWayTagCorrector reverseWayTagCorrector = new ReverseWayTagCorrector(); 53 Collection<Command> c = new LinkedList<Command>(); 54 for (Way w : sel) { 55 Way wnew = new Way(w); 52 56 Collections.reverse(wnew.nodes); 53 c.add(new ChangeCommand(w, wnew)); 54 } 55 Main.main.undoRedo.add(new SequenceCommand(tr("Reverse ways"), c)); 56 Main.map.repaint(); 57 if (Main.pref.getBoolean("tag-correction.reverse-way", true)) 58 propertiesUpdated = reverseWayTagCorrector.execute(wnew) || propertiesUpdated; 59 c.add(new ChangeCommand(w, wnew)); 60 } 61 Main.main.undoRedo.add(new SequenceCommand(tr("Reverse ways"), c)); 62 if (propertiesUpdated) 63 Main.map.getPropertiesDialog().selectionChanged(Main.ds.getSelected()); 64 Main.map.repaint(); 57 65 } 58 66 } -
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r627 r729 67 67 public final ButtonGroup toolGroup = new ButtonGroup(); 68 68 69 private PropertiesDialog propertiesDialog; 69 70 70 71 public MapFrame() { … … 95 96 96 97 addToggleDialog(new LayerListDialog(this)); 97 addToggleDialog( new PropertiesDialog(this));98 addToggleDialog(propertiesDialog = new PropertiesDialog(this)); 98 99 addToggleDialog(new HistoryDialog()); 99 100 addToggleDialog(new SelectionListDialog()); … … 188 189 panel.add(statusLine, BorderLayout.SOUTH); 189 190 } 191 192 public final PropertiesDialog getPropertiesDialog() { 193 return propertiesDialog; 194 } 190 195 }
Note:
See TracChangeset
for help on using the changeset viewer.