Changeset 6449 in josm


Ignore:
Timestamp:
2013-12-07T04:29:28+01:00 (11 years ago)
Author:
Don-vip
Message:

see #3626 - fix history of selected primitives

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/HistoryInfoAction.java

    r6448 r6449  
    1 //License: GPL. For details, see LICENSE file.
     1// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.actions;
    33
     
    1414import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    1515
     16/**
     17 * Display history information about OSM ways, nodes, or relations.
     18 * @since 968
     19 */
    1620public class HistoryInfoAction extends JosmAction {
    1721
     22    /**
     23     * Constructs a new {@code HistoryInfoAction}.
     24     */
    1825    public HistoryInfoAction() {
    1926        super(tr("History"), "about",
     
    4047    }
    4148
     49    /**
     50     * Dialog allowing to choose object id if no one is selected.
     51     * @since 6448
     52     */
    4253    public static class HistoryObjectIDDialog extends OsmIdSelectionDialog {
    4354
     55        /**
     56         * Constructs a new {@code HistoryObjectIDDialog}.
     57         */
    4458        public HistoryObjectIDDialog() {
    4559            super(Main.parent, tr("Show history"), new String[]{tr("Show history"), tr("Cancel")});
     
    4862        }
    4963    }
    50 
    5164}
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryDataSet.java

    r6440 r6449  
    1313import org.openstreetmap.josm.Main;
    1414import org.openstreetmap.josm.data.osm.Changeset;
     15import org.openstreetmap.josm.data.osm.IPrimitive;
    1516import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
    1617import org.openstreetmap.josm.data.osm.PrimitiveId;
     
    2021import org.openstreetmap.josm.gui.layer.Layer;
    2122import org.openstreetmap.josm.tools.CheckParameterUtil;
    22 import org.openstreetmap.josm.tools.Utils;
    2323
    2424/**
    2525 * A data set holding histories of OSM primitives.
    26  *
    27  *
     26 * @since 1670
    2827 */
    2928public class HistoryDataSet implements LayerChangeListener{
     
    163162        CheckParameterUtil.ensureParameterNotNull(pid, "pid");
    164163        List<HistoryOsmPrimitive> versions = data.get(pid);
     164        if (versions == null && pid instanceof IPrimitive) {
     165            versions = data.get(((IPrimitive) pid).getPrimitiveId());
     166        }
    165167        if (versions == null)
    166168            return null;
Note: See TracChangeset for help on using the changeset viewer.