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

@@ -372,15 +372,15 @@ caf::PdmObject* RimGridCrossPlot::findPdmObjectFromPlotCurve( const RiuPlotCurve
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlot::onAxisSelected( int axis, bool toggle )
void RimGridCrossPlot::onAxisSelected( RiuPlotAxis axis, bool toggle )
{
RiuPlotMainWindowTools::showPlotMainWindow();
RimPlotAxisProperties* properties = nullptr;
if ( axis == QwtAxis::YLeft )
if ( axis.axis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
{
properties = m_yAxisProperties;
}
else if ( axis == QwtAxis::XBottom )
else if ( axis.axis() == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
{
properties = m_xAxisProperties;
}

View File

@@ -105,7 +105,7 @@ public:
void setAutoScaleXEnabled( bool enabled ) override;
void setAutoScaleYEnabled( bool enabled ) override;
caf::PdmObject* findPdmObjectFromPlotCurve( const RiuPlotCurve* curve ) const override;
void onAxisSelected( int axis, bool toggle ) override;
void onAxisSelected( RiuPlotAxis axis, bool toggle ) override;
bool isDeletable() const override;