[Marble-commits] branches/KDE/4.3/kdeedu/marble/src
Patrick Spendrin
ps_ml at gmx.de
Fri Jul 10 02:39:16 CEST 2009
SVN commit 994059 by sengels:
backport r993605, r993864, r994011 and r994014
fixes for loading kml correctly
M +3 -3 lib/MarbleModel.cpp
M +3 -2 lib/MarblePlacemarkModel.cpp
M +9 -3 lib/geodata/data/GeoDataLineString.cpp
M +2 -2 plugins/render/geodata/GeoRendererView.cpp
--- branches/KDE/4.3/kdeedu/marble/src/lib/MarbleModel.cpp #994058:994059
@@ -424,9 +424,9 @@
for (; itds != endds; ++itds) {
GeoSceneAbstractDataset* dataset = *itds;
if( dataset->fileFormat() == "KML" ) {
- loadedContainers.removeOne( reinterpret_cast<GeoSceneXmlDataSource*>(dataset)
- ->filename() );
- loadList << reinterpret_cast<GeoSceneXmlDataSource*>(dataset)->filename();
+ QString containername = reinterpret_cast<GeoSceneXmlDataSource*>(dataset)->filename();
+ loadedContainers.removeOne( containername );
+ loadList << containername;
}
}
}
--- branches/KDE/4.3/kdeedu/marble/src/lib/MarblePlacemarkModel.cpp #994058:994059
@@ -213,13 +213,14 @@
endRemoveRows();
}
- beginInsertRows( QModelIndex(), 0, placemarks.count() - 1 );
+ const int length = d->m_placemarkContainer.count();
+ beginInsertRows( QModelIndex(), length, length + placemarks.count() - 1 );
createFilterProperties( placemarks );
d->m_placemarkContainer << placemarks;
endInsertRows();
- emit dataChanged( index( 0, 0 ), index( placemarks.count() - 1, 0 ) );
+ emit dataChanged( index( length, 0 ), index( length + placemarks.count() - 1, 0 ) );
}
void MarblePlacemarkModel::removePlacemarks( const QString &containerName,
--- branches/KDE/4.3/kdeedu/marble/src/lib/geodata/data/GeoDataLineString.cpp #994058:994059
@@ -317,9 +317,15 @@
GeoDataLineString GeoDataLineString::toPoleCorrected() const
{
- GeoDataLineString poleCorrected;
- p()->toPoleCorrected( *this, poleCorrected );
- return poleCorrected;
+ if( isClosed() ) {
+ GeoDataLinearRing poleCorrected;
+ p()->toPoleCorrected( *this, poleCorrected );
+ return poleCorrected;
+ } else {
+ GeoDataLineString poleCorrected;
+ p()->toPoleCorrected( *this, poleCorrected );
+ return poleCorrected;
+ }
}
void GeoDataLineStringPrivate::toPoleCorrected( const GeoDataLineString& q, GeoDataLineString& poleCorrected )
--- branches/KDE/4.3/kdeedu/marble/src/plugins/render/geodata/GeoRendererView.cpp #994058:994059
@@ -152,8 +152,8 @@
if( m_painter->brush().color() != m_root->style( mapped ).polyStyle().color() ) {
/* qDebug() << "BrushColor:"
<< m_root->style( mapped ).polyStyle().color()
- << m_painter->brush().color();*/
- m_painter->setBrush( m_currentBrush.color() );
+ << m_painter->brush().color();*/
+ m_painter->setBrush( m_root->style( mapped ).polyStyle().color() );
}
}
More information about the Marble-commits
mailing list