Changeset 80 in josm for src/org/openstreetmap
- Timestamp:
- 2006-04-03T23:12:07+02:00 (19 years ago)
- Location:
- src/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/Main.java
r79 r80 35 35 import org.openstreetmap.josm.actions.UndoAction; 36 36 import org.openstreetmap.josm.actions.UploadAction; 37 import org.openstreetmap.josm.actions.WmsServerAction;38 37 import org.openstreetmap.josm.data.Preferences; 39 38 import org.openstreetmap.josm.data.osm.DataSet; … … 85 84 private OpenAction openAction; 86 85 private DownloadAction downloadAction; 87 private Action wmsServerAction;86 //private Action wmsServerAction; 88 87 89 88 /** … … 102 101 downloadAction = new DownloadAction(); 103 102 Action uploadAction = new UploadAction(); 104 wmsServerAction = new WmsServerAction();103 //wmsServerAction = new WmsServerAction(); 105 104 openAction = new OpenAction(); 106 105 Action saveAction = new SaveAction(); … … 325 324 mapFrame.setVisible(true); 326 325 } 327 //TODO: This is really hacky to unselect the action when the layer gets328 // deleted. The whole mapView/mapFrame/layer concept needs refactoring!329 if (mapFrame == null && (Boolean)wmsServerAction.getValue(Action.SELECTED_KEY))330 wmsServerAction.putValue(Action.SELECTED_KEY, false);331 326 } 332 327 /** -
src/org/openstreetmap/josm/gui/IconToggleButton.java
r79 r80 21 21 super(action); 22 22 setText(null); 23 23 24 24 // Tooltip 25 25 String toolTipText = ""; -
src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r79 r80 7 7 8 8 import javax.swing.AbstractButton; 9 import javax.swing.Action;10 9 import javax.swing.BorderFactory; 11 10 import javax.swing.JLabel; … … 53 52 EventQueue.invokeLater(new Runnable(){ 54 53 public void run() { 55 action.putValue(Action.SELECTED_KEY, true);54 action.putValue("active", true); 56 55 action.actionPerformed(null); 57 56 } -
src/org/openstreetmap/josm/io/GpxReader.java
r71 r80 8 8 import java.io.Reader; 9 9 import java.util.HashMap; 10 import java.util.Iterator; 10 11 11 12 import org.jdom.Element; … … 102 103 addNode(data, node); 103 104 } 104 105 105 106 // read ways (and line segments) 106 107 for (Object wayElement : e.getChildren("trk", GPX)) … … 112 113 osm.id = 0; 113 114 115 // clean up the data a bit (remove broken stuff) 116 // remove line segments with from==to 117 for (Iterator<LineSegment> it = data.lineSegments.iterator(); it.hasNext();) { 118 LineSegment ls = it.next(); 119 if (ls.from.equals(ls.to)) { 120 it.remove(); 121 for (Way w : data.ways) 122 w.segments.remove(ls); 123 } 124 } 125 // remove double line segments (remove only subsequent doubles yet) 126 for (Iterator<Way> it = data.ways.iterator(); it.hasNext();) { 127 LineSegment ls = null; 128 for (Iterator<LineSegment> its = it.next().segments.iterator(); its.hasNext();) { 129 LineSegment cur = its.next(); 130 if (ls != null && ls.equals(cur)) 131 its.remove(); 132 ls = cur; 133 } 134 } 135 // remove empty ways 136 for (Iterator<Way> it = data.ways.iterator(); it.hasNext();) 137 if (it.next().segments.isEmpty()) 138 it.remove(); 139 114 140 return data; 115 141 } -
src/org/openstreetmap/josm/tools/TileCache.java
r79 r80 28 28 * 29 29 * The tile identifier is an 32-bit integer whose bits are ordered in pairs of two. 30 * If bit0 (the LSB) is 0, then the tile is right of the equator (0 °). If bit1 is 0, it31 * is in the northern hemisphere. The next two bits representing the quarter within32 * the first quarter, so bit2 equals to 0 means, it is in the right half of the33 * quarter, represented by bit0 and bit1.30 * If bit0 (the LSB) is 0, then the tile is right of the equator (0 grad). If bit1 31 * is 0, it is in the northern hemisphere. The next two bits representing the 32 * quarter within the first quarter, so bit2 equals to 0 means, it is in the right 33 * half of the quarter, represented by bit0 and bit1. 34 34 */ 35 35 public class TileCache {
Note:
See TracChangeset
for help on using the changeset viewer.