Changeset 9453 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2016-01-14T23:44:35+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/history
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java
r9441 r9453 182 182 } 183 183 184 /** 185 * Pans the map to the old+new coordinate 186 * @see JMapViewer#setDisplayToFitMapMarkers() 187 */ 188 public void setDisplayToFitMapMarkers() { 189 mapViewer.setDisplayToFitMapMarkers(); 190 } 191 184 192 private static class Updater { 185 193 private final transient HistoryBrowserModel model; 186 194 private final PointInTimeType role; 187 195 188 p ublicUpdater(HistoryBrowserModel model, PointInTimeType role) {196 protected Updater(HistoryBrowserModel model, PointInTimeType role) { 189 197 this.model = model; 190 198 this.role = role; -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowser.java
r8308 r9453 11 11 import javax.swing.JSplitPane; 12 12 import javax.swing.JTabbedPane; 13 import javax.swing.event.ChangeEvent; 14 import javax.swing.event.ChangeListener; 13 15 14 16 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 64 66 pnl.setLayout(new BorderLayout()); 65 67 pnl.add(tpViewers, BorderLayout.CENTER); 68 69 tpViewers.addChangeListener(new ChangeListener() { 70 @Override 71 public void stateChanged(ChangeEvent e) { 72 if (tpViewers.getSelectedComponent() == coordinateInfoViewer) { 73 // while building the component size is not yet known, thus panning does not give reasonable results 74 coordinateInfoViewer.setDisplayToFitMapMarkers(); 75 } 76 } 77 }); 78 66 79 return pnl; 67 80 }
Note:
See TracChangeset
for help on using the changeset viewer.