Quoting the forum thread: 1) If you enable FileViewWidget, you may want to enable/disable or open/close user-opened documents (shapefiles, kml or others). Usually, everything's fine when you open or enable document (or separate objects in it). But when you try to disable document, you may see that not all document's objects gone from map. Furthermore, if you try to close that document, application will crash when rendering GeometryLayer. All this is because, when document deleted from TreeModel or erased at all from memory, not all of its objects deleted from GeoGraphicsScene. Root of the problem is in function GeoGraphicsScene::removeItem (file GeoGraphicsScene.cpp) - not all pointers to document's object are deleted from graphics scene. Code: Select all void GeoGraphicsScene::removeItem( const GeoDataFeature* feature ) { ///- const TileId key = d->m_features.value( feature ); ///- QList< GeoGraphicsItem* >& tileList = d->m_items[key]; ///- foreach( GeoGraphicsItem* item, tileList ) { ///- if( item->feature() == feature ) { ///- d->m_features.remove( feature ); ///- tileList.removeAll( item ); ///- return; ///- } ///- } foreach( TileId key, d->m_items.keys() ) { ///+ QList< GeoGraphicsItem* >& tileList = d->m_items[key]; ///+ foreach( GeoGraphicsItem* item, tileList ) { ///+ if( item->feature() == feature ) ///+ tileList.removeAll( item ); ///+ } ///+ } ///+ d->m_features.remove( feature ); ///+ }
This might have been introduced in bb92970f93b4463b30dff9a8bdb7f49ccd63fc9b I see the problem when opening Overlay.kml from examples/kml/ and closing it. The overlays are still rendered afterwards.
Might be a duplicate of bug 318512.
*** This bug has been marked as a duplicate of bug 318512 ***