From 28d8d9d07dc91e2658c1d7650dba901bb0684049 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 26 Jun 2020 12:58:15 +0200 Subject: [PATCH] #6153 MSW: Do not report WSEGVALV for inactive cells --- .../RicWellPathExportMswCompletionsImpl.cpp | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp b/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp index 4c2d5e267f..2d1d846bd9 100644 --- a/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp +++ b/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp @@ -714,16 +714,21 @@ void RicWellPathExportMswCompletionsImpl::generateWsegvalvTable( RifTextDataTabl if ( !icd->subSegments().empty() ) { CVF_ASSERT( icd->subSegments().size() == 1u ); - if ( icd->completionType() == RigCompletionData::PERFORATION_ICD || - icd->completionType() == RigCompletionData::PERFORATION_ICV ) + + auto firstSubSegment = icd->subSegments().front(); + if ( !firstSubSegment->intersections().empty() ) { - formatter.comment( icd->label() ); + if ( icd->completionType() == RigCompletionData::PERFORATION_ICD || + icd->completionType() == RigCompletionData::PERFORATION_ICV ) + { + formatter.comment( icd->label() ); + } + formatter.add( exportInfo.wellPath()->completions()->wellNameForExport() ); + formatter.add( firstSubSegment->segmentNumber() ); + formatter.add( icd->flowCoefficient() ); + formatter.add( QString( "%1" ).arg( icd->area(), 8, 'g', 4 ) ); + formatter.rowCompleted(); } - formatter.add( exportInfo.wellPath()->completions()->wellNameForExport() ); - formatter.add( icd->subSegments().front()->segmentNumber() ); - formatter.add( icd->flowCoefficient() ); - formatter.add( QString( "%1" ).arg( icd->area(), 8, 'g', 4 ) ); - formatter.rowCompleted(); } } }