Revision 36188 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/GraphicLayer.java
GraphicLayer.java | ||
---|---|---|
271 | 271 |
|
272 | 272 |
// spatialIndex.insert(g.getGeom().getBounds2D()) |
273 | 273 |
if (fullExtent == null) { |
274 |
fullExtent = g.getGeom().getBounds2D();
|
|
274 |
fullExtent = (Rectangle2D) g.getGeom().getBounds2D().clone();
|
|
275 | 275 |
} else { |
276 | 276 |
fullExtent.add(g.getGeom().getBounds2D()); |
277 | 277 |
} |
... | ... | |
295 | 295 |
public void insertGraphic(int position, FGraphic g) { |
296 | 296 |
graphics.add(position, g); |
297 | 297 |
if (fullExtent == null) { |
298 |
fullExtent = g.getGeom().getBounds2D();
|
|
298 |
fullExtent = (Rectangle2D) g.getGeom().getBounds2D().clone();
|
|
299 | 299 |
} else { |
300 | 300 |
fullExtent.add(g.getGeom().getBounds2D()); |
301 | 301 |
} |
... | ... | |
445 | 445 |
fullExtent = g.getGeom().getBounds2D(); |
446 | 446 |
for (int i = 1; i < graphics.size(); i++) { |
447 | 447 |
g = (FGraphic) graphics.get(i); |
448 |
Rectangle2D rAux = g.getGeom().getBounds2D();
|
|
448 |
Rectangle2D rAux = (Rectangle2D) g.getGeom().getBounds2D().clone();
|
|
449 | 449 |
|
450 | 450 |
fullExtent.add(rAux); |
451 | 451 |
} |
Also available in: Unified diff