From 3938e9e6001ee9e7d3e4eb636a7309237804acfc Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 9 Dec 2021 14:11:48 +0100 Subject: [PATCH] #8359 Plot Project Tree : Always show multi plot collection If no multi plots was present, the top level collection was not visible. This caused the project tree to collapse when a new plot was created. --- .../Commands/PlotBuilderCommands/RicSummaryPlotBuilder.cpp | 3 +-- ApplicationLibCode/ProjectDataModel/RimProject.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicSummaryPlotBuilder.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicSummaryPlotBuilder.cpp index cf45535b41..dd40aea3bc 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicSummaryPlotBuilder.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicSummaryPlotBuilder.cpp @@ -241,10 +241,9 @@ RimMultiPlot* RicSummaryPlotBuilder::createAndAppendMultiPlot( const std::vector plot->loadDataAndUpdate(); } - project->updateAllRequiredEditors(); + plotCollection->updateAllRequiredEditors(); plotWindow->loadDataAndUpdate(); - RiuPlotMainWindowTools::setExpanded( plotCollection, true ); RiuPlotMainWindowTools::selectAsCurrentItem( plotWindow, true ); return plotWindow; diff --git a/ApplicationLibCode/ProjectDataModel/RimProject.cpp b/ApplicationLibCode/ProjectDataModel/RimProject.cpp index f33befda5d..32f4de1f93 100644 --- a/ApplicationLibCode/ProjectDataModel/RimProject.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimProject.cpp @@ -1474,8 +1474,7 @@ void RimProject::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, Q itemCollection->add( mainPlotCollection->saturationPressurePlotCollection() ); } - if ( mainPlotCollection->multiPlotCollection() && - !mainPlotCollection->multiPlotCollection()->multiPlots().empty() ) + if ( mainPlotCollection->multiPlotCollection() ) { itemCollection->add( mainPlotCollection->multiPlotCollection() ); }