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

This commit is contained in:
Magne Sjaastad 2020-06-25 20:16:42 +02:00
parent c50ace8a01
commit 396a71da37
2 changed files with 25 additions and 8 deletions

View File

@ -161,8 +161,6 @@ void RimWellFlowRateCurve::onLoadDataAndUpdate( bool updateParentPlot )
{
this->RimPlotCurve::updateCurvePresentation( updateParentPlot );
if ( isCurveVisible() )
{
m_qwtPlotCurve->setTitle( createCurveAutoName() );
updateStackedPlotData();
@ -171,7 +169,6 @@ void RimWellFlowRateCurve::onLoadDataAndUpdate( bool updateParentPlot )
if ( m_parentQwtPlot ) m_parentQwtPlot->replot();
}
}
//--------------------------------------------------------------------------------------------------
///
@ -186,8 +183,12 @@ void RimWellFlowRateCurve::updateCurveAppearance()
firstAncestorOrThisOfTypeAsserted( wellLogTrack );
std::map<int, std::vector<RimWellFlowRateCurve*>> stackedCurveGroups = wellLogTrack->visibleStackedCurves();
const std::vector<RimWellFlowRateCurve*>& curveGroup = stackedCurveGroups[this->m_groupId];
if ( !curveGroup.empty() )
{
isLastCurveInGroup = ( curveGroup.back() == this );
}
}
if ( isUsingConnectionNumberDepthType() )
{
@ -241,6 +242,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 );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -61,6 +61,7 @@ protected:
void updateCurveAppearance() override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
private:
bool isUsingConnectionNumberDepthType() const;