From ad8e2cb2964d2331bf63215008fef5b3f60aa690 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 29 Feb 2024 21:53:00 +0100 Subject: [PATCH] Improve logging text --- .../ProjectDataModel/Polygons/RimPolygonFile.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonFile.cpp b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonFile.cpp index a4d358887d..38f901516c 100644 --- a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonFile.cpp +++ b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonFile.cpp @@ -77,6 +77,15 @@ void RimPolygonFile::loadData() m_polygons.deleteChildren(); m_polygons.setValue( polygonsFromFile ); + + if ( polygonsFromFile.empty() ) + { + RiaLogging::warning( "No polygons found in file: " + m_fileName().path() ); + } + else + { + RiaLogging::warning( QString( "Imported %1 polygons from file: " ).arg( polygonsFromFile.size() ) + m_fileName().path() ); + } } }