Quoting the forum thread: "2) When displaying two boxes handling crossing the IDL there may have duplicate objects from left and right box - this duplicates must be erased, otherwise they will be drawn twice. This effect can be seen on the semitransparent objects, such as user-opened files (kml for example) with alpha channel in fill polygon colors. Issue occurs in function GeoGraphicsScene::items (file GeoGraphicsScene.cpp)." Proposed fix: QList< GeoGraphicsItem* > GeoGraphicsScene::items( const Marble::GeoDataLatLonAltBox& box, int zoomLevel ) const { if ( box.west() > box.east() ) { // Handle boxes crossing the IDL by splitting it into two separate boxes GeoDataLatLonAltBox left; left.setWest( -M_PI ); left.setEast( box.east() ); left.setNorth( box.north() ); left.setSouth( box.south() ); GeoDataLatLonAltBox right; right.setWest( box.west() ); right.setEast( M_PI ); right.setNorth( box.north() ); right.setSouth( box.south() ); ///- return items( left, zoomLevel ) + items( right, zoomLevel ); QList<GeoGraphicsItem *> leftItems = items( left, zoomLevel ); ///+ QList<GeoGraphicsItem *> rightItems = items( right, zoomLevel ); ///+ for( int i = 0; i < leftItems.size(); i++ ) { ///+ for( int j = 0; j < rightItems.size(); ) { ///+ if( leftItems.at( i ) == rightItems.at( j ) ) { ///+ rightItems.removeAt( j ); ///+ continue; ///+ } ///+ j++; ///+ } ///+ } ///+ return leftItems + rightItems; ///+ } <...> return result; }
Git commit 23e1f6e7fbc13ad11b989f81874e3e110fe7dcef by Dennis Nienhüser. Committed on 06/02/2013 at 19:53. Pushed by nienhueser into branch 'master'. Do not render objects crossing the IDL twice. Based on a patch by artembogdanov, thanks! M +7 -1 src/lib/GeoGraphicsScene.cpp http://commits.kde.org/marble/23e1f6e7fbc13ad11b989f81874e3e110fe7dcef