mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-05 21:53:27 -06:00
#4038 2D plot Source data stepping re-set curve interpolation
This commit is contained in:
parent
1717a5bf30
commit
f4e0a154ee
@ -72,7 +72,7 @@ void RiaSummaryTools::notifyCalculatedCurveNameHasChanged(const QString& previou
|
||||
if (adr.quantityName() == previousCurveName.toStdString())
|
||||
{
|
||||
RifEclipseSummaryAddress updatedAdr = RifEclipseSummaryAddress::calculatedAddress(currentCurveName.toStdString());
|
||||
curve->setSummaryAddressY(updatedAdr);
|
||||
curve->setSummaryAddressYAndApplyInterpolation(updatedAdr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ RimSummaryCurve* RicPlotProductionRateFeature::addSummaryCurve( RimSummaryPlot*
|
||||
plot->addCurveAndUpdate(newCurve);
|
||||
|
||||
newCurve->setSummaryCaseY(gridSummaryCase);
|
||||
newCurve->setSummaryAddressY(addr);
|
||||
newCurve->setSummaryAddressYAndApplyInterpolation(addr);
|
||||
newCurve->setColor(color);
|
||||
newCurve->setLeftOrRightAxisY(plotAxis);
|
||||
newCurve->loadDataAndUpdate(true);
|
||||
|
@ -61,7 +61,7 @@ RimSummaryCurve* RicNewSummaryCurveFeature::addCurveToPlot(RimSummaryPlot* plot,
|
||||
newCurve->setSummaryCaseY(summaryCase);
|
||||
}
|
||||
|
||||
newCurve->setSummaryAddressY(RifEclipseSummaryAddress::fieldAddress("FOPT"));
|
||||
newCurve->setSummaryAddressYAndApplyInterpolation(RifEclipseSummaryAddress::fieldAddress("FOPT"));
|
||||
|
||||
newCurve->loadDataAndUpdate(true);
|
||||
|
||||
|
@ -463,7 +463,7 @@ void RicSummaryCurveCreator::updatePreviewCurvesFromCurveDefinitions(
|
||||
RimSummaryCase* currentCase = curveDef.summaryCase();
|
||||
RimSummaryCurve* curve = new RimSummaryCurve();
|
||||
curve->setSummaryCaseY(currentCase);
|
||||
curve->setSummaryAddressY(curveDef.summaryAddress());
|
||||
curve->setSummaryAddressYAndApplyInterpolation(curveDef.summaryAddress());
|
||||
curve->applyCurveAutoNameSettings(*m_curveNameConfig());
|
||||
if (currentCase->isObservedData()) curve->setSymbolSkipDistance(0);
|
||||
|
||||
|
@ -977,7 +977,7 @@ void RimEnsembleCurveSet::updateEnsembleCurves(const std::vector<RimSummaryCase*
|
||||
{
|
||||
RimSummaryCurve* curve = new RimSummaryCurve();
|
||||
curve->setSummaryCaseY(sumCase);
|
||||
curve->setSummaryAddressY(addr->address());
|
||||
curve->setSummaryAddressYAndApplyInterpolation(addr->address());
|
||||
curve->setLeftOrRightAxisY(m_plotAxis());
|
||||
|
||||
addCurve(curve);
|
||||
@ -1069,7 +1069,7 @@ void RimEnsembleCurveSet::updateStatisticsCurves(const std::vector<RimSummaryCas
|
||||
}
|
||||
curve->setLineStyle(RiuQwtPlotCurve::STYLE_SOLID);
|
||||
curve->setSummaryCaseY(m_ensembleStatCase.get());
|
||||
curve->setSummaryAddressY(address);
|
||||
curve->setSummaryAddressYAndApplyInterpolation(address);
|
||||
curve->setLeftOrRightAxisY(m_plotAxis());
|
||||
|
||||
curve->updateCurveVisibility(false);
|
||||
|
@ -203,6 +203,16 @@ RifEclipseSummaryAddress RimSummaryCurve::summaryAddressY() const
|
||||
return m_yValuesCurveVariable->address();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCurve::setSummaryAddressYAndApplyInterpolation(const RifEclipseSummaryAddress& address)
|
||||
{
|
||||
setSummaryAddressY(address);
|
||||
|
||||
calculateCurveInterpolationFromAddress();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -216,8 +226,6 @@ void RimSummaryCurve::setSummaryAddressY(const RifEclipseSummaryAddress& address
|
||||
m_yValuesCurveVariable->setAddress(address);
|
||||
|
||||
m_yValuesSummaryFilter->updateFromAddress(address);
|
||||
|
||||
calculateCurveInterpolationFromAddress();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -54,7 +54,9 @@ public:
|
||||
// Y Axis functions
|
||||
void setSummaryCaseY(RimSummaryCase* sumCase);
|
||||
RimSummaryCase* summaryCaseY() const;
|
||||
void setSummaryAddressYAndApplyInterpolation(const RifEclipseSummaryAddress& address);
|
||||
void setSummaryAddressY(const RifEclipseSummaryAddress& address);
|
||||
|
||||
RifEclipseSummaryAddress summaryAddressY() const;
|
||||
std::string unitNameY() const;
|
||||
std::vector<double> valuesY() const;
|
||||
@ -76,7 +78,7 @@ public:
|
||||
void updateQwtPlotAxis();
|
||||
void applyCurveAutoNameSettings(const RimSummaryCurveAutoName& autoNameSettings);
|
||||
|
||||
QString curveExportDescription(const RifEclipseSummaryAddress& address = RifEclipseSummaryAddress()) const override;
|
||||
QString curveExportDescription(const RifEclipseSummaryAddress& address = RifEclipseSummaryAddress()) const override;
|
||||
void forceUpdateCurveAppearanceFromCaseType();
|
||||
|
||||
void markCachedDataForPurge();
|
||||
@ -97,11 +99,11 @@ protected:
|
||||
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
||||
|
||||
private:
|
||||
RifSummaryReaderInterface* valuesSummaryReaderX() const;
|
||||
RifSummaryReaderInterface* valuesSummaryReaderY() const;
|
||||
const std::vector<time_t>& timeStepsX() const;
|
||||
RifSummaryReaderInterface* valuesSummaryReaderX() const;
|
||||
RifSummaryReaderInterface* valuesSummaryReaderY() const;
|
||||
const std::vector<time_t>& timeStepsX() const;
|
||||
|
||||
void calculateCurveInterpolationFromAddress();
|
||||
void calculateCurveInterpolationFromAddress();
|
||||
|
||||
// Overridden PDM methods
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
@ -109,9 +111,9 @@ private:
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
||||
|
||||
static void appendOptionItemsForSummaryAddresses(QList<caf::PdmOptionItemInfo>* options,
|
||||
RimSummaryCase* summaryCase,
|
||||
RimSummaryFilter* summaryFilter);
|
||||
static void appendOptionItemsForSummaryAddresses(QList<caf::PdmOptionItemInfo>* options,
|
||||
RimSummaryCase* summaryCase,
|
||||
RimSummaryFilter* summaryFilter);
|
||||
|
||||
private:
|
||||
// Y values
|
||||
|
Loading…
Reference in New Issue
Block a user