Changeset 3943 in josm


Ignore:
Timestamp:
2011-03-02T17:20:51+01:00 (14 years ago)
Author:
bastiK
Message:

fixed #6040 - JOSM doesn't display mappaint colours and style for newly created multipolygons (any more)

Location:
trunk/src/org/openstreetmap/josm/data/osm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r3844 r3943  
    305305       get/set functions calling this implicitely is preferred, so we can have
    306306       transparent cache handling in the future. */
    307     public void clearCached()
     307    public void clearCachedStyle()
    308308    {
    309309        mappaintStyle = null;
     
    11671167
    11681168    private void keysChangedImpl(Map<String, String> originalKeys) {
    1169         clearCached();
     1169        clearCachedStyle();
    11701170        updateDirectionFlags();
    11711171        updateTagged();
     
    13671367            setChangesetId(other.changesetId);
    13681368        }
    1369         clearCached();
     1369        clearCachedStyle();
    13701370    }
    13711371
  • trunk/src/org/openstreetmap/josm/data/osm/Relation.java

    r3844 r3943  
    4141        boolean locked = writeLock();
    4242        try {
    43             for (RelationMember rm:this.members) {
     43            for (RelationMember rm : this.members) {
    4444                rm.getMember().removeReferrer(this);
     45                rm.getMember().clearCachedStyle();
    4546            }
    4647
     
    5051                this.members = new RelationMember[0];
    5152            }
    52             for (RelationMember rm:this.members) {
     53            for (RelationMember rm : this.members) {
    5354                rm.getMember().addReferrer(this);
     55                rm.getMember().clearCachedStyle();
    5456            }
    5557
     
    7981            members = newMembers;
    8082            member.getMember().addReferrer(this);
     83            member.getMember().clearCachedStyle();
    8184            fireMembersChanged();
    8285        } finally {
     
    9497            members = newMembers;
    9598            member.getMember().addReferrer(this);
     99            member.getMember().clearCachedStyle();
    96100            fireMembersChanged();
    97101        } finally {
     
    113117            if (originalMember.getMember() != member.getMember()) {
    114118                member.getMember().addReferrer(this);
     119                member.getMember().clearCachedStyle();
    115120                originalMember.getMember().removeReferrer(this);
     121                originalMember.getMember().clearCachedStyle();
    116122                fireMembersChanged();
    117123            }
  • trunk/src/org/openstreetmap/josm/data/osm/Way.java

    r3844 r3943  
    6262            }
    6363
    64             clearCached();
     64            clearCachedStyle();
    6565            fireNodesChanged();
    6666        } finally {
     
    323323            if (isIncomplete())
    324324                throw new IllegalStateException(tr("Cannot add node {0} to incomplete way {1}.", n.getId(), getId()));
    325             clearCached();
     325            clearCachedStyle();
    326326            n.addReferrer(this);
    327327            Node[] newNodes = new Node[nodes.length + 1];
     
    352352                throw new IllegalStateException(tr("Cannot add node {0} to incomplete way {1}.", n.getId(), getId()));
    353353
    354             clearCached();
     354            clearCachedStyle();
    355355            n.addReferrer(this);
    356356            Node[] newNodes = new Node[nodes.length + 1];
Note: See TracChangeset for help on using the changeset viewer.