[Marble-commits] KDE/kdeedu/marble/src/lib
Thibaut Gridel
tgridel at free.fr
Sat Jan 15 14:34:47 CET 2011
SVN commit 1214591 by tgridel:
GeoDataTreeModel: checkbox only for Placemarks with a geometry
M +9 -4 GeoDataTreeModel.cpp
--- trunk/KDE/kdeedu/marble/src/lib/GeoDataTreeModel.cpp #1214590:1214591
@@ -208,10 +208,14 @@
}
else if ( role == Qt::CheckStateRole
&& index.column() == 0 ) {
- if ( object->nodeType() == GeoDataTypes::GeoDataPlacemarkType
- || object->nodeType() == GeoDataTypes::GeoDataFolderType
- || object->nodeType() == GeoDataTypes::GeoDataDocumentType ) {
- GeoDataFeature *feature = static_cast<GeoDataFeature*>( object );
+ if ( object->nodeType() == GeoDataTypes::GeoDataPlacemarkType ) {
+ GeoDataPlacemark *feature = static_cast<GeoDataPlacemark*>( object );
+ const char* type = feature->geometry()->nodeType();
+ if ( type == GeoDataTypes::GeoDataLineStringType
+ || type == GeoDataTypes::GeoDataPolygonType
+ || type == GeoDataTypes::GeoDataLinearRingType
+ || type == GeoDataTypes::GeoDataMultiGeometryType
+ ) {
if ( feature->isVisible() ) {
return QVariant( Qt::Checked );
}
@@ -220,6 +224,7 @@
}
}
}
+ }
else if ( role == Qt::DecorationRole
&& index.column() == 0 ) {
if ( object->nodeType() == GeoDataTypes::GeoDataPlacemarkType
More information about the Marble-commits
mailing list