Merge pull request #4720 from OPM/minor-summary-adjustments

Minor summary adjustments
This commit is contained in:
Magne Sjaastad 2019-09-13 20:32:25 +02:00 committed by GitHub
commit b6dcb6285e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 8 deletions

View File

@ -146,7 +146,11 @@ QWidget* RicSummaryCurveCreatorSplitterUi::createWidget( QWidget* parent )
m_firstColumnSplitter->insertWidget( 0, firstRowFrame );
m_firstColumnSplitter->insertWidget( 1, secondRowFrame );
m_firstColumnSplitter->setSizes( QList<int>() << 1 << 2 );
const int firstRowPixelHeight = 500;
const int secondRowPixelHeight = 300;
m_firstColumnSplitter->setSizes( QList<int>() << firstRowPixelHeight << secondRowPixelHeight );
m_layout->addWidget( m_firstColumnSplitter );

View File

@ -579,7 +579,7 @@ void RiuSummaryCurveDefSelection::setDefaultSelection( const std::vector<Summary
if ( allSumCases.size() > 0 )
{
RifEclipseSummaryAddress defaultAddress = RifEclipseSummaryAddress::fieldAddress( "FOPT" );
RifEclipseSummaryAddress defaultAddress;
std::vector<SummarySource*> selectTheseSources = defaultSources;
if ( selectTheseSources.empty() ) selectTheseSources.push_back( allSumCases[0] );
@ -612,11 +612,6 @@ void RiuSummaryCurveDefSelection::setSelectedCurveDefinitions( const std::vector
RimSummaryCase* summaryCase = curveDef.summaryCase();
RifEclipseSummaryAddress summaryAddress = curveDef.summaryAddress();
if ( summaryAddress.category() == RifEclipseSummaryAddress::SUMMARY_INVALID )
{
// If we have an invalid address, set the default address to Field
summaryAddress = RifEclipseSummaryAddress::fieldAddress( summaryAddress.quantityName() );
}
// Ignore ensemble statistics curves
if ( summaryAddress.category() == RifEclipseSummaryAddress::SUMMARY_ENSEMBLE_STATISTICS ) continue;
@ -627,7 +622,15 @@ void RiuSummaryCurveDefSelection::setSelectedCurveDefinitions( const std::vector
if ( std::find( selectedCategories.begin(), selectedCategories.end(), summaryAddress.category() ) ==
selectedCategories.end() )
{
m_selectedSummaryCategories.v().push_back( summaryAddress.category() );
if ( summaryAddress.category() != RifEclipseSummaryAddress::SUMMARY_INVALID )
{
m_selectedSummaryCategories.v().push_back( summaryAddress.category() );
}
else
{
// Use field category as fall back category to avoid an empty list of vectors
summaryAddress = RifEclipseSummaryAddress::fieldAddress( "" );
}
}
// Select case if not already selected