From b5351846da80a4a7e24410269b38991a381a7e9d Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 29 Feb 2024 21:56:43 +0100 Subject: [PATCH] Do not show file polygon in view if no polygons are imported --- .../ProjectDataModel/Polygons/RimPolygonInViewCollection.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonInViewCollection.cpp b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonInViewCollection.cpp index cbb27a74aa..4c60f9bba1 100644 --- a/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonInViewCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Polygons/RimPolygonInViewCollection.cpp @@ -163,6 +163,8 @@ void RimPolygonInViewCollection::syncCollectionsWithView() for ( auto polygonFile : polygonCollection->polygonFiles() ) { + if ( polygonFile->polygons().empty() ) continue; + auto viewPolygonFile = getCollectionInViewForPolygonFile( polygonFile ); if ( viewPolygonFile == nullptr ) {