From 1b9999b4a3cb6623f67a2ebdd63568ed572d2ec2 Mon Sep 17 00:00:00 2001 From: rinkk <karsten.rink@ufz.de> Date: Tue, 26 Feb 2019 16:06:34 +0100 Subject: [PATCH] fixed surfaces not being loaded into data explorer --- GeoLib/GEOObjects.cpp | 5 +---- GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/GeoLib/GEOObjects.cpp b/GeoLib/GEOObjects.cpp index 1ca37464f2e..15562145f91 100644 --- a/GeoLib/GEOObjects.cpp +++ b/GeoLib/GEOObjects.cpp @@ -219,10 +219,7 @@ void GEOObjects::addSurfaceVec( { _sfc_vecs.push_back( new SurfaceVec(name, std::move(sfc), std::move(sfc_names))); - if (_sfc_vecs.back()->size() == 0) - { - _callbacks->addSurfaceVec(name); - } + _callbacks->addSurfaceVec(name); } bool GEOObjects::appendSurfaceVec(const std::vector<Surface*>& surfaces, diff --git a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp index f1bce4fb53a..2fef80291b7 100644 --- a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp +++ b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp @@ -215,9 +215,9 @@ void XmlGmlInterface::readPolylines( ply_names->insert(std::pair<std::string, std::size_t>(ply_name, idx)); } else { WARN( - "Polyline '%s' exists already. The polyline will be " + "Polyline '%s' exists already. Polyline %d will be " "inserted without a name.", - ply_name.c_str()); + ply_name.c_str(), idx); } } @@ -232,8 +232,8 @@ void XmlGmlInterface::readPolylines( polyline_name = polyline.attribute("name").toStdString(); OGS_FATAL( - "Polyline `%s' contains the point id `%d', but the " - "id is not in the point list.", + "Polyline `%s' contains the point id `%d' which is " + "not in the point list.", polyline_name.c_str(), pt_idx); } return search->second; @@ -276,8 +276,8 @@ void XmlGmlInterface::readSurfaces( surface_name = surface.attribute("name").toStdString(); OGS_FATAL( - "Surface `%s' contains the point id `%d', but the " - "id is not in the point list.", + "Surface `%s' contains the point id `%d', which is " + "not in the point list.", surface_name.c_str(), pt_idx); } return search->second; @@ -363,13 +363,13 @@ bool XmlGmlInterface::write() } else { - ERR("XmlGmlInterface::write(): Point vector empty, abort writing geometry."); + ERR("XmlGmlInterface::write(): Point vector is empty, abort writing geometry."); return 0; } } else { - ERR("XmlGmlInterface::write(): Did not found any point vector, abort writing geometry."); + ERR("XmlGmlInterface::write(): No point vector found, abort writing geometry."); return 0; } @@ -412,11 +412,11 @@ bool XmlGmlInterface::write() } } else - INFO("XmlGmlInterface::write(): Polyline vector empty, no polylines written to file."); + INFO("XmlGmlInterface::write(): Polyline vector is empty, no polylines written to file."); } } else - INFO("XmlGmlInterface::write(): Did not found any polyline vector, no polylines written to file."); + INFO("XmlGmlInterface::write(): Polyline vector is empty, no polylines written to file."); // SURFACES @@ -458,11 +458,11 @@ bool XmlGmlInterface::write() } } else - INFO("XmlGmlInterface::write(): Surface vector empty, no surfaces written to file."); + INFO("XmlGmlInterface::write(): Surface vector is empty, no surfaces written to file."); } } else - INFO("XmlGmlInterface::write(): Did not found any surface vector, no surfaces written to file."); + INFO("XmlGmlInterface::write(): Surface vector is empty, no surfaces written to file."); //insertStyleFileDefinition(filename); -- GitLab