mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2898 Ensemble curves. Add vector selection button and dialog
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "RiaSummaryCurveDefinition.h"
|
||||
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
|
||||
#include "RiuSummaryCurveDefSelection.h"
|
||||
#include "RiuSummaryCurveDefSelectionEditor.h"
|
||||
#include "RiuTools.h"
|
||||
@@ -77,9 +79,28 @@ void RiuSummaryCurveDefSelectionDialog::setCaseAndAddress(RimSummaryCase* summar
|
||||
{
|
||||
if (summaryCase)
|
||||
{
|
||||
std::vector<RiaSummaryCurveDefinition> sumCasePairs;
|
||||
sumCasePairs.push_back(RiaSummaryCurveDefinition(summaryCase, address));
|
||||
summaryAddressSelection()->setSelectedCurveDefinitions(sumCasePairs);
|
||||
std::vector<RiaSummaryCurveDefinition> curveDefs;
|
||||
curveDefs.push_back(RiaSummaryCurveDefinition(summaryCase, address));
|
||||
summaryAddressSelection()->setSelectedCurveDefinitions(curveDefs);
|
||||
}
|
||||
|
||||
summaryAddressSelection()->updateConnectedEditors();
|
||||
updateLabel();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryCurveDefSelectionDialog::setEnsembleAndAddress(RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& address)
|
||||
{
|
||||
if (ensemble)
|
||||
{
|
||||
std::vector<RiaSummaryCurveDefinition> curveDefs;
|
||||
for (const auto& summaryCase : ensemble->allSummaryCases())
|
||||
{
|
||||
curveDefs.push_back(RiaSummaryCurveDefinition(summaryCase, address, ensemble));
|
||||
}
|
||||
summaryAddressSelection()->setSelectedCurveDefinitions(curveDefs);
|
||||
}
|
||||
|
||||
summaryAddressSelection()->updateConnectedEditors();
|
||||
@@ -94,6 +115,22 @@ std::vector<RiaSummaryCurveDefinition> RiuSummaryCurveDefSelectionDialog::curveS
|
||||
return summaryAddressSelection()->selectedCurveDefinitions();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryCurveDefSelectionDialog::hideEnsembles()
|
||||
{
|
||||
summaryAddressSelection()->hideEnsembles(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryCurveDefSelectionDialog::hideSummaryCases()
|
||||
{
|
||||
summaryAddressSelection()->hideSummaryCases(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user