Make sure axis is set correctly when appending plots

The plots are duplicated, and the axis objects are referenced using ptrField. Make sure resolveReferencesRecursively() is called after the plot is inserted into the project tree.
This commit is contained in:
Magne Sjaastad
2023-10-28 10:50:10 +02:00
parent 4ffd11da24
commit a91afff937

View File

@@ -77,6 +77,7 @@ void RicAppendSummaryPlotsForObjectsFeature::appendPlots( RimSummaryMultiPlot*
if ( summaryAdrCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::SUMMARY_CASE )
{
summaryMultiPlot->addPlot( duplicatedPlot );
duplicatedPlot->resolveReferencesRecursively();
auto summaryCase = RiaSummaryTools::summaryCaseById( summaryAdrCollection->caseId() );
if ( summaryCase )
@@ -84,6 +85,7 @@ void RicAppendSummaryPlotsForObjectsFeature::appendPlots( RimSummaryMultiPlot*
for ( auto c : duplicatedPlot->summaryCurves() )
{
c->setSummaryCaseY( summaryCase );
c->setSummaryCaseX( summaryCase );
}
}