mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6039 Well Allocation Plot: Update flow rate curves after change of visibility
This commit is contained in:
parent
16663ed47a
commit
53f6471cd1
@ -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 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -60,6 +60,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;
|
||||
|
Loading…
Reference in New Issue
Block a user