mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Do not create curve for empty history vector
This commit is contained in:
parent
d4ff0a0175
commit
3d53c9de1e
@ -210,7 +210,7 @@ RiaPreferences::RiaPreferences()
|
||||
m_timeFormat.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() );
|
||||
m_timeFormat = RiaQDateTimeTools::supportedTimeFormats().front();
|
||||
|
||||
CAF_PDM_InitField( &m_useUndoRedo, "useUndoRedo", true, "Enable Undo/Redo for Property Editor changes" );
|
||||
CAF_PDM_InitField( &m_useUndoRedo, "useUndoRedo", false, "Enable Undo/Redo for Property Editor changes" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_useUndoRedo );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_plotTemplateFolders, "plotTemplateFolders", "Plot Template Folder(s)" );
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include "RiaSummaryTools.h"
|
||||
|
||||
#include "RimSummaryAddress.h"
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
#include "RicSummaryPlotBuilder.h"
|
||||
@ -85,18 +87,32 @@ void RicNewSummaryMultiPlotFromDataVectorFeature::onActionTriggered( bool isChec
|
||||
isEnsemble = isEnsemble || adr->isEnsemble();
|
||||
}
|
||||
|
||||
std::set<RifEclipseSummaryAddress> availableAddresses;
|
||||
|
||||
if ( isEnsemble )
|
||||
{
|
||||
for ( auto id : ensembleIds )
|
||||
{
|
||||
selectedEnsembles.push_back( RiaSummaryTools::ensembleById( id ) );
|
||||
auto ensemble = RiaSummaryTools::ensembleById( id );
|
||||
if ( ensemble )
|
||||
{
|
||||
selectedEnsembles.push_back( ensemble );
|
||||
|
||||
if ( availableAddresses.empty() ) availableAddresses = ensemble->ensembleSummaryAddresses();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( auto id : caseIds )
|
||||
{
|
||||
selectedCases.push_back( RiaSummaryTools::summaryCaseById( id ) );
|
||||
auto summaryCase = RiaSummaryTools::summaryCaseById( id );
|
||||
if ( summaryCase )
|
||||
{
|
||||
selectedCases.push_back( summaryCase );
|
||||
if ( availableAddresses.empty() && summaryCase->summaryReader() )
|
||||
availableAddresses = summaryCase->summaryReader()->allResultAddresses();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -110,7 +126,8 @@ void RicNewSummaryMultiPlotFromDataVectorFeature::onActionTriggered( bool isChec
|
||||
{
|
||||
auto historyAddr = addr;
|
||||
historyAddr.setVectorName( addr.vectorName() + RifReaderEclipseSummary::historyIdentifier() );
|
||||
eclipseAddresses.insert( historyAddr );
|
||||
|
||||
if ( availableAddresses.count( historyAddr ) > 0 ) eclipseAddresses.insert( historyAddr );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user