mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
#8370: Address review comments
Keep original additional summary files on Save As, reject cases combined with ensembles, keep unrestored additional file mappings, support growing file sets, update short names on ensemble import, simplify aggregator and example.
This commit is contained in:
1 parent
d93aa839a6
commit
597a7775d9
7 files changed
+73
-21
No files matched your search
@@ -175,6 +175,11 @@ std::expected<caf::PdmObjectHandle*, QString> RimProject_importSummaryEnsemble::
|
||||
|
||||
auto ensemble = mainCollection->addEnsemble( newCases, m_ensembleName(), true );
|
||||
|
||||
for ( auto summaryCase : ensemble->allSummaryCases() )
|
||||
{
|
||||
summaryCase->updateAutoShortName();
|
||||
}
|
||||
|
||||
// The name template is only used when auto naming is disabled
|
||||
if ( !m_ensembleName().isEmpty() ) ensemble->setAutoName( false );
|
||||
RiaSummaryTools::updateSummaryEnsembleNames();
|
||||
|
||||
@@ -55,6 +55,11 @@ std::expected<caf::PdmObjectHandle*, QString> RimcSummaryMultiPlot_appendSubplot
|
||||
|
||||
auto multiPlot = self<RimSummaryMultiPlot>();
|
||||
|
||||
if ( !m_summaryCases().empty() && !m_ensembles().empty() )
|
||||
{
|
||||
return std::unexpected( "Specify either summary cases or ensembles, not both." );
|
||||
}
|
||||
|
||||
RimSummaryPlot* newPlot = RimcSummaryPlotCollection_newSummaryPlot::createSummaryPlot( m_summaryCases.ptrReferencedObjectsByType(),
|
||||
m_ensembles.ptrReferencedObjectsByType(),
|
||||
m_addressString() );
|
||||
|
||||
@@ -62,8 +62,13 @@ RimcSummaryPlotCollection_newSummaryPlot::RimcSummaryPlotCollection_newSummaryPl
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::expected<caf::PdmObjectHandle*, QString> RimcSummaryPlotCollection_newSummaryPlot::execute()
|
||||
{
|
||||
RimSummaryPlot* newPlot =
|
||||
createSummaryPlot( m_summaryCases.ptrReferencedObjectsByType(), allEnsembles( m_ensemble(), m_ensembles ), m_addressString() );
|
||||
auto ensembles = allEnsembles( m_ensemble(), m_ensembles );
|
||||
if ( !m_summaryCases().empty() && !ensembles.empty() )
|
||||
{
|
||||
return std::unexpected( "Specify either summary cases or ensembles, not both." );
|
||||
}
|
||||
|
||||
RimSummaryPlot* newPlot = createSummaryPlot( m_summaryCases.ptrReferencedObjectsByType(), ensembles, m_addressString() );
|
||||
|
||||
// Plots created without an address are already added to a multi plot
|
||||
if ( newPlot && !newPlot->firstAncestorOrThisOfType<RimSummaryMultiPlot>() )
|
||||
@@ -173,6 +178,11 @@ std::expected<caf::PdmObjectHandle*, QString> RimcSummaryPlotCollection_newSumma
|
||||
{
|
||||
if ( m_addressStrings().empty() ) return std::unexpected( "Specify at least one address." );
|
||||
|
||||
if ( !m_summaryCases().empty() && !m_ensembles().empty() )
|
||||
{
|
||||
return std::unexpected( "Specify either summary cases or ensembles, not both." );
|
||||
}
|
||||
|
||||
// A subplot without an address is created in a separate multi plot
|
||||
for ( const QString& address : m_addressStrings() )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user