mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2112 Avoid updating legend for each curve. Generalize and roll out the solution found for summary curves
This commit is contained in:
parent
9070a97815
commit
324d6d72e3
@ -134,7 +134,7 @@ QString RimWellFlowRateCurve::createCurveAutoName()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellFlowRateCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
{
|
||||
RimWellLogCurve::updateCurvePresentation();
|
||||
this->RimPlotCurve::updateCurvePresentation(updateParentPlot);
|
||||
|
||||
if (isCurveVisible())
|
||||
{
|
||||
|
@ -293,7 +293,7 @@ void RimGridTimeHistoryCurve::updateZoomInParentPlot()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridTimeHistoryCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
{
|
||||
this->RimPlotCurve::updateCurvePresentation();
|
||||
this->RimPlotCurve::updateCurvePresentation(updateParentPlot);
|
||||
|
||||
if (isCurveVisible())
|
||||
{
|
||||
|
@ -210,13 +210,20 @@ void RimPlotCurve::updateCurveVisibility()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::updateCurvePresentation()
|
||||
void RimPlotCurve::updateCurvePresentation(bool updatePlotLegend)
|
||||
{
|
||||
this->updateCurveVisibility();
|
||||
this->updateCurveNameAndUpdatePlotLegend();
|
||||
|
||||
if (updatePlotLegend)
|
||||
{
|
||||
this->updateCurveNameAndUpdatePlotLegend();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->updateCurveNameNoLegendUpdate();
|
||||
}
|
||||
|
||||
updateCurveAppearance();
|
||||
// Todo: Rest of the curve setup controlled from this class
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -106,7 +106,7 @@ protected:
|
||||
virtual void updateZoomInParentPlot() = 0;
|
||||
virtual void onLoadDataAndUpdate(bool updateParentPlot) = 0;
|
||||
|
||||
void updateCurvePresentation();
|
||||
void updateCurvePresentation(bool updatePlotLegend);
|
||||
virtual void updateCurveAppearance();
|
||||
|
||||
void updateOptionSensitivity();
|
||||
|
@ -291,7 +291,7 @@ void RimWellLogExtractionCurve::fieldChangedByUi(const caf::PdmFieldHandle* chan
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogExtractionCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
{
|
||||
RimWellLogCurve::updateCurvePresentation();
|
||||
this->RimPlotCurve::updateCurvePresentation(updateParentPlot);
|
||||
|
||||
if (isCurveVisible())
|
||||
{
|
||||
|
@ -76,7 +76,7 @@ RimWellLogFileCurve::~RimWellLogFileCurve()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogFileCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
{
|
||||
RimWellLogCurve::updateCurvePresentation();
|
||||
this->RimPlotCurve::updateCurvePresentation(updateParentPlot);
|
||||
|
||||
if (isCurveVisible())
|
||||
{
|
||||
|
@ -265,7 +265,7 @@ QString RimWellLogRftCurve::createCurveAutoName()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogRftCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
{
|
||||
RimWellLogCurve::updateCurvePresentation();
|
||||
this->RimPlotCurve::updateCurvePresentation(updateParentPlot);
|
||||
|
||||
m_isUsingPseudoLength = false;
|
||||
|
||||
@ -322,8 +322,11 @@ void RimWellLogRftCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
|
||||
m_qwtPlotCurve->setLineSegmentStartStopIndices(m_curveData->polylineStartStopIndices());
|
||||
|
||||
updateZoomInParentPlot();
|
||||
if (m_parentQwtPlot) m_parentQwtPlot->replot();
|
||||
if ( updateParentPlot && m_parentQwtPlot)
|
||||
{
|
||||
updateZoomInParentPlot();
|
||||
m_parentQwtPlot->replot();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -449,14 +449,16 @@ void RimWellLogTrack::loadDataAndUpdate()
|
||||
{
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
firstAncestorOrThisOfType(wellLogPlot);
|
||||
|
||||
if (wellLogPlot && m_wellLogTrackPlotWidget)
|
||||
{
|
||||
m_wellLogTrackPlotWidget->setDepthTitle(wellLogPlot->depthPlotTitle());
|
||||
m_wellLogTrackPlotWidget->setXTitle(m_xAxisTitle);
|
||||
}
|
||||
|
||||
for (size_t cIdx = 0; cIdx < curves.size(); ++cIdx)
|
||||
{
|
||||
curves[cIdx]->loadDataAndUpdate(true);
|
||||
curves[cIdx]->loadDataAndUpdate(false);
|
||||
}
|
||||
|
||||
if (m_showFormations)
|
||||
@ -467,8 +469,14 @@ void RimWellLogTrack::loadDataAndUpdate()
|
||||
{
|
||||
setFormationFieldsUiReadOnly(true);
|
||||
}
|
||||
|
||||
updateFormationNamesOnPlot();
|
||||
|
||||
if ( m_wellLogTrackPlotWidget )
|
||||
{
|
||||
m_wellLogTrackPlotWidget->updateLegend();
|
||||
this->updateAxisScaleEngine();
|
||||
this->updateFormationNamesOnPlot();
|
||||
this->updateXZoomAndParentPlotDepthZoom();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -130,7 +130,7 @@ void RimAsciiDataCurve::updateZoomInParentPlot()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimAsciiDataCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
{
|
||||
this->RimPlotCurve::updateCurvePresentation();
|
||||
this->RimPlotCurve::updateCurvePresentation(updateParentPlot);
|
||||
|
||||
if (isCurveVisible())
|
||||
{
|
||||
|
@ -377,17 +377,7 @@ void RimSummaryCurve::updateZoomInParentPlot()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
{
|
||||
this->updateCurveVisibility();
|
||||
if (updateParentPlot)
|
||||
{
|
||||
this->updateCurveNameAndUpdatePlotLegend();
|
||||
}
|
||||
else
|
||||
{
|
||||
this->updateCurveNameNoLegendUpdate();
|
||||
}
|
||||
|
||||
updateCurveAppearance();
|
||||
this->RimPlotCurve::updateCurvePresentation(updateParentPlot);
|
||||
|
||||
m_selectedVariableDisplayField = QString::fromStdString(m_curveVariable->address().uiText());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user