Changeset 4591 in josm for trunk/src


Ignore:
Timestamp:
2011-11-13T09:41:28+01:00 (13 years ago)
Author:
jttt
Message:

Fix #7056 not possible to copy relations anymore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeCellRenderer.java

    r3083 r4591  
    6464    public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded,
    6565            boolean leaf, int row, boolean hasFocus) {
     66
     67        // Hackish fix for #7056 - if name template for duplicated relation contains tags from parent, template will fail because getReffers doesn't work on primitives not yet in dataset
     68        if (!tree.isRootVisible() && tree.getModel().getRoot() == value)
     69            return this;
     70
    6671        renderIcon();
    6772        renderValue((Relation)value);
Note: See TracChangeset for help on using the changeset viewer.