Ignore:
Timestamp:
10.03.2010 19:11:58 (2 years ago)
Author:
jttt
Message:

Fix #4624 Relations not rendered right away

File:
1 edited

Legend:

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

    r3102 r3107  
    334334    @Override 
    335335    public BBox getBBox() { 
    336         if (bbox == null) { 
    337             calculateBBox(new HashSet<PrimitiveId>()); 
     336        if (getDataSet() == null) 
     337            return calculateBBox(new HashSet<PrimitiveId>()); 
     338        else { 
    338339            if (bbox == null) { 
    339                 bbox = new BBox(0, 0, 0, 0); // No members 
    340             } 
    341         } 
    342         return  bbox; 
     340                bbox = calculateBBox(new HashSet<PrimitiveId>()); 
     341                if (bbox == null) { 
     342                    bbox = new BBox(0, 0, 0, 0); // No members 
     343                } 
     344            } 
     345            return  bbox; 
     346        } 
    343347    } 
    344348 
     
    374378        super.setDataset(dataSet); 
    375379        checkMembers(); 
     380        bbox = null; // bbox might have changed if relation was in ds, was removed, modified, added back to dataset 
    376381    } 
    377382 
     
    401406    /** 
    402407     * Replies true if at least one child primitive is incomplete 
    403      *  
     408     * 
    404409     * @return true if at least one child primitive is incomplete 
    405410     */ 
     
    414419     * Replies a collection with the incomplete children this relation 
    415420     * refers to 
    416      *  
     421     * 
    417422     * @return the incomplete children. Empty collection if no children are incomplete. 
    418423     */ 
Note: See TracChangeset for help on using the changeset viewer.