#6039 Well Allocation Plot: Update flow rate curves after change of visibility

This commit is contained in:
Magne Sjaastad
2020-08-24 08:26:10 +02:00
parent 16663ed47a
commit 53f6471cd1
2 changed files with 30 additions and 13 deletions

View File

@@ -161,21 +161,18 @@ void RimWellFlowRateCurve::onLoadDataAndUpdate( bool updateParentPlot )
{
this->RimPlotCurve::updateCurvePresentation( updateParentPlot );
if ( isCurveVisible() )
m_qwtPlotCurve->setTitle( createCurveAutoName() );
if ( updateParentPlot )
{
m_qwtPlotCurve->setTitle( createCurveAutoName() );
RimWellLogTrack* track = nullptr;
this->firstAncestorOrThisOfTypeAsserted( track );
track->updateStackedCurveData();
if ( updateParentPlot )
{
RimWellLogTrack* track = nullptr;
this->firstAncestorOrThisOfTypeAsserted( track );
track->updateStackedCurveData();
updateZoomInParentPlot();
}
if ( m_parentQwtPlot ) m_parentQwtPlot->replot();
updateZoomInParentPlot();
}
if ( m_parentQwtPlot ) m_parentQwtPlot->replot();
}
//--------------------------------------------------------------------------------------------------
@@ -191,7 +188,11 @@ void RimWellFlowRateCurve::updateCurveAppearance()
firstAncestorOrThisOfTypeAsserted( wellLogTrack );
std::map<int, std::vector<RimWellLogCurve*>> stackedCurveGroups = wellLogTrack->visibleStackedCurves();
const std::vector<RimWellLogCurve*>& curveGroup = stackedCurveGroups[this->m_groupId];
isLastCurveInGroup = ( curveGroup.back() == this );
if ( !curveGroup.empty() )
{
isLastCurveInGroup = ( curveGroup.back() == this );
}
}
if ( isUsingConnectionNumberDepthType() )
@@ -246,6 +247,21 @@ void RimWellFlowRateCurve::defineUiOrdering( QString uiConfigName, caf::PdmUiOrd
uiOrdering.skipRemainingFields();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellFlowRateCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue )
{
if ( changedField == &m_showCurve )
{
loadDataAndUpdate( true );
}
RimWellLogCurve::fieldChangedByUi( changedField, oldValue, newValue );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------