RiuQwtPlotWidget: fix actions on selection of axis.

This commit is contained in:
Kristian Bendiksen
2022-04-01 15:57:11 +02:00
parent 7cb72688ea
commit 11060078d8
14 changed files with 47 additions and 53 deletions

View File

@@ -377,30 +377,11 @@ caf::PdmObject* RimSummaryPlot::findPdmObjectFromPlotCurve( const RiuPlotCurve*
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryPlot::onAxisSelected( int axis, bool toggle )
void RimSummaryPlot::onAxisSelected( RiuPlotAxis axis, bool toggle )
{
RiuPlotMainWindowTools::showPlotMainWindow();
caf::PdmObject* itemToSelect = nullptr;
if ( axis == QwtAxis::YLeft )
{
itemToSelect = m_leftYAxisProperties_OBSOLETE;
}
else if ( axis == QwtAxis::YRight )
{
itemToSelect = m_rightYAxisProperties_OBSOLETE;
}
else if ( axis == QwtAxis::XBottom )
{
if ( m_isCrossPlot )
{
itemToSelect = m_bottomAxisProperties_OBSOLETE;
}
else
{
itemToSelect = m_timeAxisProperties_OBSOLETE;
}
}
caf::PdmObject* itemToSelect = axisPropertiesForPlotAxis( axis );
if ( toggle )
{