From 421163d60150515f5d5f11e87c584366cca825e3 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 2 Nov 2021 14:29:57 +0100 Subject: [PATCH] Janitor : Call direct parent when overriding virtual methods When overriding initAfterReader, make sure to always call direct parent. Failing to do so caused RimPlotCurve::initAfterRead() not to be called, and color and other appearance settings was not imported correctly. --- ApplicationLibCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp | 2 ++ ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurve.cpp | 2 ++ .../ProjectDataModel/WellLog/RimWellLogFileCurve.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/ApplicationLibCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp b/ApplicationLibCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp index 6d491d3ec8..a60e1bd5cc 100644 --- a/ApplicationLibCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp @@ -598,6 +598,8 @@ void RimGridTimeHistoryCurve::defineUiOrdering( QString uiConfigName, caf::PdmUi //-------------------------------------------------------------------------------------------------- void RimGridTimeHistoryCurve::initAfterRead() { + RimPlotCurve::initAfterRead(); + updateResultDefinitionFromCase(); } diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurve.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurve.cpp index 14ef45fac1..f2db0bec13 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurve.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCurve.cpp @@ -745,6 +745,8 @@ void RimSummaryCurve::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrderi //-------------------------------------------------------------------------------------------------- void RimSummaryCurve::initAfterRead() { + RimStackablePlotCurve::initAfterRead(); + if ( m_isEnsembleCurve().isPartiallyTrue() ) { m_isEnsembleCurve.v() = ( summaryCaseY() && summaryCaseY()->ensemble() ) ? caf::Tristate::State::True diff --git a/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogFileCurve.cpp b/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogFileCurve.cpp index fecf2f9492..df7daccfe2 100644 --- a/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogFileCurve.cpp +++ b/ApplicationLibCode/ProjectDataModel/WellLog/RimWellLogFileCurve.cpp @@ -423,6 +423,8 @@ QList RimWellLogFileCurve::calculateValueOptions( const //-------------------------------------------------------------------------------------------------- void RimWellLogFileCurve::initAfterRead() { + RimWellLogCurve::initAfterRead(); + if ( !m_wellPath ) return; if ( m_wellPath->wellLogFiles().size() == 1 )