mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5051 Do not auto zoom when adding/removing curves in plot
This commit is contained in:
parent
42c134cbe4
commit
cf190b05c1
@ -197,8 +197,8 @@ void RimPlotCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|||||||
{
|
{
|
||||||
if ( changedField == &m_showCurve )
|
if ( changedField == &m_showCurve )
|
||||||
{
|
{
|
||||||
this->updateCurveVisibility( true );
|
this->updateCurveVisibility();
|
||||||
if ( m_showCurve() ) loadDataAndUpdate( true );
|
if ( m_showCurve() ) loadDataAndUpdate( false );
|
||||||
}
|
}
|
||||||
else if ( changedField == &m_curveName )
|
else if ( changedField == &m_curveName )
|
||||||
{
|
{
|
||||||
@ -284,7 +284,7 @@ void RimPlotCurve::setLegendEntryText( const QString& legendEntryText )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimPlotCurve::updateCurveVisibility( bool updateParentPlot )
|
void RimPlotCurve::updateCurveVisibility()
|
||||||
{
|
{
|
||||||
if ( canCurveBeAttached() )
|
if ( canCurveBeAttached() )
|
||||||
{
|
{
|
||||||
@ -295,11 +295,6 @@ void RimPlotCurve::updateCurveVisibility( bool updateParentPlot )
|
|||||||
m_qwtPlotCurve->detach();
|
m_qwtPlotCurve->detach();
|
||||||
m_qwtCurveErrorBars->detach();
|
m_qwtCurveErrorBars->detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( updateParentPlot )
|
|
||||||
{
|
|
||||||
updateZoomInParentPlot();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -318,7 +313,7 @@ void RimPlotCurve::initAfterRead()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimPlotCurve::updateCurvePresentation( bool updatePlotLegendAndTitle )
|
void RimPlotCurve::updateCurvePresentation( bool updatePlotLegendAndTitle )
|
||||||
{
|
{
|
||||||
this->updateCurveVisibility( updatePlotLegendAndTitle );
|
this->updateCurveVisibility();
|
||||||
|
|
||||||
if ( updatePlotLegendAndTitle )
|
if ( updatePlotLegendAndTitle )
|
||||||
{
|
{
|
||||||
|
@ -100,7 +100,7 @@ public:
|
|||||||
QString legendEntryText() const;
|
QString legendEntryText() const;
|
||||||
void setLegendEntryText( const QString& legendEntryText );
|
void setLegendEntryText( const QString& legendEntryText );
|
||||||
|
|
||||||
void updateCurveVisibility( bool updateParentPlot );
|
void updateCurveVisibility();
|
||||||
void updateLegendEntryVisibilityAndPlotLegend();
|
void updateLegendEntryVisibilityAndPlotLegend();
|
||||||
void updateLegendEntryVisibilityNoPlotUpdate();
|
void updateLegendEntryVisibilityNoPlotUpdate();
|
||||||
|
|
||||||
|
@ -1007,7 +1007,7 @@ void RimEnsembleCurveSet::updateEnsembleCurves( const std::vector<RimSummaryCase
|
|||||||
|
|
||||||
addCurve( curve );
|
addCurve( curve );
|
||||||
|
|
||||||
curve->updateCurveVisibility( false );
|
curve->updateCurveVisibility();
|
||||||
curve->loadDataAndUpdate( false );
|
curve->loadDataAndUpdate( false );
|
||||||
curve->updateQwtPlotAxis();
|
curve->updateQwtPlotAxis();
|
||||||
|
|
||||||
@ -1104,7 +1104,7 @@ void RimEnsembleCurveSet::updateStatisticsCurves( const std::vector<RimSummaryCa
|
|||||||
curve->setSummaryAddressYAndApplyInterpolation( address );
|
curve->setSummaryAddressYAndApplyInterpolation( address );
|
||||||
curve->setLeftOrRightAxisY( m_plotAxis() );
|
curve->setLeftOrRightAxisY( m_plotAxis() );
|
||||||
|
|
||||||
curve->updateCurveVisibility( false );
|
curve->updateCurveVisibility();
|
||||||
curve->loadDataAndUpdate( false );
|
curve->loadDataAndUpdate( false );
|
||||||
curve->updateQwtPlotAxis();
|
curve->updateQwtPlotAxis();
|
||||||
}
|
}
|
||||||
|
@ -321,6 +321,8 @@ void RiuSummaryQwtPlot::endZoomOperations()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiuSummaryQwtPlot::onZoomedSlot()
|
void RiuSummaryQwtPlot::onZoomedSlot()
|
||||||
{
|
{
|
||||||
|
plotDefinition()->setAutoScaleXEnabled( false );
|
||||||
|
plotDefinition()->setAutoScaleYEnabled( false );
|
||||||
plotDefinition()->updateZoomFromQwt();
|
plotDefinition()->updateZoomFromQwt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user