mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix update issues when switching from axis side (#8664)
* #8610 Ensemble import : Set default axis * Summary Axis : Delete previous axis when switching side * Janitor: Use auto and empty()
This commit is contained in:
@@ -981,6 +981,22 @@ void RiuQtChartsPlotWidget::addAxis( RiuPlotAxis plotAxis, bool isEnabled, bool
|
||||
m_axesAutoScale[plotAxis] = isAutoScale;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuQtChartsPlotWidget::deleteAxis( RiuPlotAxis axis )
|
||||
{
|
||||
auto toBeDeleted = plotAxis( axis );
|
||||
|
||||
qtChart()->removeAxis( toBeDeleted );
|
||||
m_axes.erase( axis );
|
||||
m_axesEnabled.erase( axis );
|
||||
m_axesAutoScale.erase( axis );
|
||||
|
||||
delete toBeDeleted;
|
||||
toBeDeleted = nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1195,10 +1211,7 @@ void RiuQtChartsPlotWidget::pruneAxes( const std::set<RiuPlotAxis>& usedAxes )
|
||||
{
|
||||
if ( usedAxes.count( plotAxis ) == 0 )
|
||||
{
|
||||
// This axis is now unused, and can be disabled
|
||||
qtAxis->setVisible( false );
|
||||
m_axesEnabled[plotAxis] = false;
|
||||
m_axesAutoScale[plotAxis] = false;
|
||||
deleteAxis( plotAxis );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user