From 4d780b491522be3358a838c74d06a4f2680eb750 Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Mon, 28 Jun 2021 13:04:29 +0200 Subject: [PATCH] #7716 Ensemble Well Logs: hide curves in project tree. --- .../ProjectDataModel/RimEnsembleWellLogCurveSet.cpp | 2 ++ ApplicationLibCode/ProjectDataModel/RimWellLogTrack.cpp | 8 ++++++++ ApplicationLibCode/ProjectDataModel/RimWellLogTrack.h | 2 ++ 3 files changed, 12 insertions(+) diff --git a/ApplicationLibCode/ProjectDataModel/RimEnsembleWellLogCurveSet.cpp b/ApplicationLibCode/ProjectDataModel/RimEnsembleWellLogCurveSet.cpp index b42362b691..df6f0aa01a 100644 --- a/ApplicationLibCode/ProjectDataModel/RimEnsembleWellLogCurveSet.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimEnsembleWellLogCurveSet.cpp @@ -186,6 +186,8 @@ void RimEnsembleWellLogCurveSet::loadDataAndUpdate( bool updateParentPlot ) RimWellLogTrack* parentPlot; firstAncestorOrThisOfTypeAsserted( parentPlot ); parentPlot->viewer()->scheduleReplot(); + + parentPlot->setCurvesTreeVisibility( false ); } } diff --git a/ApplicationLibCode/ProjectDataModel/RimWellLogTrack.cpp b/ApplicationLibCode/ProjectDataModel/RimWellLogTrack.cpp index b61d7f0bee..2cead634bb 100644 --- a/ApplicationLibCode/ProjectDataModel/RimWellLogTrack.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimWellLogTrack.cpp @@ -3091,3 +3091,11 @@ void RimWellLogTrack::addUnderburden( std::vector& namesVector, CurveSa curveData.data.push_back( namesVector.size() - 1 ); } } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::setCurvesTreeVisibility( bool isVisible ) +{ + m_curves.uiCapability()->setUiTreeChildrenHidden( !isVisible ); +} diff --git a/ApplicationLibCode/ProjectDataModel/RimWellLogTrack.h b/ApplicationLibCode/ProjectDataModel/RimWellLogTrack.h index 48c241ed16..7a6b18e907 100644 --- a/ApplicationLibCode/ProjectDataModel/RimWellLogTrack.h +++ b/ApplicationLibCode/ProjectDataModel/RimWellLogTrack.h @@ -231,6 +231,8 @@ public: static void addOverburden( std::vector& namesVector, CurveSamplingPointData& curveData, double height ); static void addUnderburden( std::vector& namesVector, CurveSamplingPointData& curveData, double height ); + void setCurvesTreeVisibility( bool isVisible ); + protected: // RimViewWindow overrides void deleteViewWidget() override;