Ignore:
Timestamp:
2016-06-20T00:06:54+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13001 - Add MainPanel + some new methods (patch by michael2402, modified) - gsoc-core

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r10412 r10432  
    3232
    3333import javax.swing.AbstractButton;
    34 import javax.swing.ActionMap;
    35 import javax.swing.InputMap;
    3634import javax.swing.JComponent;
    3735import javax.swing.JPanel;
     
    4240import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent;
    4341import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
     42import org.openstreetmap.josm.data.ProjectionBounds;
    4443import org.openstreetmap.josm.data.SelectionChangedListener;
    4544import org.openstreetmap.josm.data.ViewportData;
     
    495494     * Constructs a new {@code MapView}.
    496495     * @param layerManager The layers to display.
    497      * @param contentPane The content pane used to register shortcuts in its
    498      * {@link InputMap} and {@link ActionMap}
     496     * @param contentPane Ignored. Main content pane is used.
    499497     * @param viewportData the initial viewport of the map. Can be null, then
    500498     * the viewport is derived from the layer data.
     
    598596        if (layer instanceof MarkerLayer && playHeadMarker == null) {
    599597            playHeadMarker = PlayHeadMarker.create();
     598        }
     599
     600        ProjectionBounds viewProjectionBounds = layer.getViewProjectionBounds();
     601        if (viewProjectionBounds != null) {
     602            scheduleZoomTo(new ViewportData(viewProjectionBounds));
    600603        }
    601604
Note: See TracChangeset for help on using the changeset viewer.