Multiaxis plot: fix moving axis from other side

This commit is contained in:
Kristian Bendiksen
2022-04-01 09:31:56 +02:00
parent dde0487024
commit 32ec472829
7 changed files with 180 additions and 45 deletions

View File

@@ -1854,15 +1854,10 @@ void RimSummaryPlot::axisPositionChanged( const caf::SignalEmitter* emitter,
{
auto oldAxisProperties = axisPropertiesForPlotAxis( oldPlotAxis );
if ( oldAxisProperties ) m_axisProperties.removeChildObject( oldAxisProperties );
plotWidget()->moveAxis( oldPlotAxis, newPlotAxis );
}
std::set<RiuPlotAxis> usedPlotAxis;
for ( const auto& axisProperties : m_axisProperties )
{
usedPlotAxis.insert( axisProperties->plotAxisType() );
}
plotWidget()->pruneAxes( usedPlotAxis );
updateAxes();
}
// This is probably to much, but difficult to find the required updates