mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3166 Plot source stepping. Display union of vectors
This commit is contained in:
parent
ee8374b105
commit
509dc818a8
@ -229,10 +229,10 @@ QList<caf::PdmOptionItemInfo> RimSummaryPlotSourceStepping::calculateValueOption
|
|||||||
|
|
||||||
std::vector<QString> identifierTexts;
|
std::vector<QString> identifierTexts;
|
||||||
|
|
||||||
RifSummaryReaderInterface* reader = firstSummaryReaderForCurves();
|
std::vector<RifSummaryReaderInterface*> readers = summaryReadersForCurves();
|
||||||
if (reader)
|
if (!readers.empty())
|
||||||
{
|
{
|
||||||
RiaSummaryCurveAnalyzer* analyzer = analyzerForReader(reader);
|
RiaSummaryCurveAnalyzer* analyzer = analyzerForReader(readers.front());
|
||||||
|
|
||||||
if (fieldNeedingOptions == &m_wellName)
|
if (fieldNeedingOptions == &m_wellName)
|
||||||
{
|
{
|
||||||
@ -260,9 +260,12 @@ QList<caf::PdmOptionItemInfo> RimSummaryPlotSourceStepping::calculateValueOption
|
|||||||
|
|
||||||
RiaSummaryCurveAnalyzer quantityAnalyzer;
|
RiaSummaryCurveAnalyzer quantityAnalyzer;
|
||||||
|
|
||||||
auto subset = RiaSummaryCurveAnalyzer::addressesForCategory(reader->allResultAddresses(), category);
|
for (auto reader : readers)
|
||||||
|
{
|
||||||
|
auto subset = RiaSummaryCurveAnalyzer::addressesForCategory(reader->allResultAddresses(), category);
|
||||||
|
quantityAnalyzer.appendAdresses(subset);
|
||||||
|
}
|
||||||
|
|
||||||
quantityAnalyzer.appendAdresses(subset);
|
|
||||||
for (const auto& quantity : quantityAnalyzer.quantities())
|
for (const auto& quantity : quantityAnalyzer.quantities())
|
||||||
{
|
{
|
||||||
identifierTexts.push_back(QString::fromStdString(quantity));
|
identifierTexts.push_back(QString::fromStdString(quantity));
|
||||||
@ -459,8 +462,9 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi(const caf::PdmFieldHandle* c
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RifSummaryReaderInterface* RimSummaryPlotSourceStepping::firstSummaryReaderForCurves() const
|
std::vector<RifSummaryReaderInterface*> RimSummaryPlotSourceStepping::summaryReadersForCurves() const
|
||||||
{
|
{
|
||||||
|
std::vector<RifSummaryReaderInterface*> readers;
|
||||||
RimSummaryCurveCollection* curveCollection = nullptr;
|
RimSummaryCurveCollection* curveCollection = nullptr;
|
||||||
this->firstAncestorOrThisOfTypeAsserted(curveCollection);
|
this->firstAncestorOrThisOfTypeAsserted(curveCollection);
|
||||||
|
|
||||||
@ -468,16 +472,16 @@ RifSummaryReaderInterface* RimSummaryPlotSourceStepping::firstSummaryReaderForCu
|
|||||||
{
|
{
|
||||||
if (isYAxisStepping() && curve->summaryCaseY())
|
if (isYAxisStepping() && curve->summaryCaseY())
|
||||||
{
|
{
|
||||||
return curve->summaryCaseY()->summaryReader();
|
readers.push_back(curve->summaryCaseY()->summaryReader());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isXAxisStepping() && curve->summaryCaseX())
|
if (isXAxisStepping() && curve->summaryCaseX())
|
||||||
{
|
{
|
||||||
return curve->summaryCaseX()->summaryReader();
|
readers.push_back(curve->summaryCaseX()->summaryReader());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return readers;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -77,7 +77,7 @@ private:
|
|||||||
caf::PdmUiEditorAttribute* attribute) override;
|
caf::PdmUiEditorAttribute* attribute) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RifSummaryReaderInterface* firstSummaryReaderForCurves() const;
|
std::vector<RifSummaryReaderInterface*> summaryReadersForCurves() const;
|
||||||
caf::PdmValueField* fieldToModify();
|
caf::PdmValueField* fieldToModify();
|
||||||
|
|
||||||
std::set<RifEclipseSummaryAddress> addressesCurveCollection() const;
|
std::set<RifEclipseSummaryAddress> addressesCurveCollection() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user