From 04d0ec7be225e8570e7dbe131e5c19df8ba6a374 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 1 Feb 2024 15:51:30 +0100 Subject: [PATCH] #11148: Set default name to Accumulated Flow Chart --- .../ProjectDataModel/Flow/RimWellAllocationPlot.cpp | 4 ++++ ApplicationLibCode/ReservoirDataModel/RigWellLogCurveData.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp b/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp index 00c28d44e1..f15174d27f 100644 --- a/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp +++ b/ApplicationLibCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp @@ -49,6 +49,7 @@ #include "RimWellLogCurveCommonDataSource.h" #include "RimWellLogLasFile.h" #include "RimWellLogPlot.h" +#include "RimWellLogPlotNameConfig.h" #include "RimWellLogTrack.h" #include "RimWellPlotTools.h" @@ -130,6 +131,9 @@ RimWellAllocationPlot::RimWellAllocationPlot() RiaDefines::DepthTypeEnum::PSEUDO_LENGTH } ); m_accumulatedWellFlowPlot->setCommonDataSourceEnabled( false ); + m_accumulatedWellFlowPlot->nameConfig()->setCustomName( "Accumulated Flow Chart" ); + m_accumulatedWellFlowPlot->setNamingMethod( RiaDefines::ObjectNamingMethod::CUSTOM ); + m_accumulatedWellFlowPlot->updateAutoName(); m_showWindow = false; setDeletable( true ); diff --git a/ApplicationLibCode/ReservoirDataModel/RigWellLogCurveData.cpp b/ApplicationLibCode/ReservoirDataModel/RigWellLogCurveData.cpp index c090d07001..f5239ed7ba 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigWellLogCurveData.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigWellLogCurveData.cpp @@ -251,6 +251,7 @@ std::vector RigWellLogCurveData::depthValuesByIntervals( RiaDefines::Dep RiaDefines::DepthUnitType destinationDepthUnit ) const { const std::vector depthValues = RigWellLogCurveData::depthsForDepthUnit( depths( depthType ), m_depthUnit, destinationDepthUnit ); + if ( depthValues.empty() ) return depthValues; std::vector filteredValues; RiaCurveDataTools::getValuesByIntervals( depthValues, m_intervalsOfContinousValidValues, &filteredValues );