Commit 84026e1b authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Keep category and visibility info. Remove wrong check.

parent 312ae71d
......@@ -29,9 +29,6 @@ NodeReducer::NodeReducer(GeoDataDocument* document, int zoomLevel) :
m_remainingNodes(0)
{
foreach (GeoDataPlacemark* placemark, placemarks()) {
if (placemark->visualCategory() == GeoDataPlacemark::None) {
continue;
}
GeoDataGeometry const * const geometry = placemark->geometry();
if(geometry->nodeType() == GeoDataTypes::GeoDataLineStringType) {
GeoDataLineString const * prevLine = static_cast<GeoDataLineString const *>(geometry);
......
......@@ -436,6 +436,8 @@ void VectorClipper::clipPolygon(const GeoDataPlacemark *placemark, const Clipper
clipper.Execute(ctIntersection, paths);
foreach(const auto &path, paths) {
GeoDataPlacemark* newPlacemark = new GeoDataPlacemark;
newPlacemark->setVisible(placemark->isVisible());
newPlacemark->setVisualCategory(placemark->visualCategory());
GeoDataLinearRing outerRing;
OsmPlacemarkData const & placemarkOsmData = placemark->osmData();
OsmPlacemarkData & newPlacemarkOsmData = newPlacemark->osmData();
......
......@@ -74,7 +74,9 @@ private:
OpenPathsFromPolyTree(tree, paths);
}
foreach(const auto &path, paths) {
GeoDataPlacemark* newPlacemark = new GeoDataPlacemark();
GeoDataPlacemark* newPlacemark = new GeoDataPlacemark;
newPlacemark->setVisible(placemark->isVisible());
newPlacemark->setVisualCategory(placemark->visualCategory());
T* newRing = new T;
QVector<int> borderPoints;
int index = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment