[Marble-commits] KDE/kdeedu/marble/src/lib/geodata/handlers/kml
Thibaut Gridel
tgridel at free.fr
Tue Sep 7 23:52:40 CEST 2010
SVN commit 1172705 by tgridel:
geodata: folder can be a root item
and this should be the same for every feature!
M +7 -1 KmlFolderTagHandler.cpp
--- trunk/KDE/kdeedu/marble/src/lib/geodata/handlers/kml/KmlFolderTagHandler.cpp #1172704:1172705
@@ -27,6 +27,7 @@
#include "GeoDataContainer.h"
#include "GeoDataFolder.h"
#include "GeoDataParser.h"
+#include "GeoDataDocument.h"
namespace Marble
{
@@ -39,8 +40,8 @@
Q_ASSERT(parser.isStartElement() && parser.isValidElement(kmlTag_Folder));
GeoStackItem parentItem = parser.parentElement();
+ GeoDataFolder *folder = new GeoDataFolder;
if ( parentItem.represents( kmlTag_Folder ) || parentItem.represents( kmlTag_Document ) ) {
- GeoDataFolder *folder = new GeoDataFolder;
GeoDataContainer *parentPtr = parentItem.nodeAs<GeoDataContainer>();
parentPtr->append( folder );
@@ -49,7 +50,12 @@
<< " parent item name: " << parentItem.qualifiedName().first;
#endif // DEBUG_TAGS
return folder;
+ } else if ( parentItem.first.first == kmlTag_kml) {
+ GeoDataDocument* doc = geoDataDoc( parser );
+ doc->append( folder );
+ return folder;
} else {
+ delete folder;
return 0;
}
}
More information about the Marble-commits
mailing list