Summary Editor : Make sure at least one source is selected

This commit is contained in:
Magne Sjaastad 2021-02-11 07:41:01 +01:00
parent cc292b197a
commit 83a1a1fa6d

View File

@ -640,6 +640,17 @@ void RicSummaryPlotEditorUi::populateCurveCreator( const RimSummaryPlot& sourceS
m_previewPlot->updatePlotTitle();
m_previewPlot->updateAxes();
if ( curveDefs.empty() )
{
auto sumCases = RimProject::current()->allSummaryCases();
if ( !sumCases.empty() )
{
RifEclipseSummaryAddress defaultAdr;
RiaSummaryCurveDefinition curveDef( sumCases.front(), defaultAdr, false );
curveDefs.push_back( curveDef );
}
}
m_summaryCurveSelectionEditor->summaryAddressSelection()->setSelectedCurveDefinitions( curveDefs );
updateAppearanceEditor();