mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5150 Improve wheel zoom with logarithmic axes
* Limit the amount to scroll at one time and set a fixed minimum
This commit is contained in:
@@ -112,9 +112,9 @@ RiuSummaryQwtPlot::RiuSummaryQwtPlot( RimPlot* plotDefinition, QWidget* parent /
|
||||
QwtPlotPanner* panner = new QwtPlotPanner( canvas() );
|
||||
panner->setMouseButton( Qt::MidButton );
|
||||
|
||||
auto wheelZoomer = new RiuQwtPlotWheelZoomer( this );
|
||||
m_wheelZoomer = new RiuQwtPlotWheelZoomer( this );
|
||||
|
||||
connect( wheelZoomer, SIGNAL( zoomUpdated() ), SLOT( onZoomedSlot() ) );
|
||||
connect( m_wheelZoomer, SIGNAL( zoomUpdated() ), SLOT( onZoomedSlot() ) );
|
||||
connect( m_zoomerLeft, SIGNAL( zoomed( const QRectF& ) ), SLOT( onZoomedSlot() ) );
|
||||
connect( m_zoomerRight, SIGNAL( zoomed( const QRectF& ) ), SLOT( onZoomedSlot() ) );
|
||||
connect( panner, SIGNAL( panned( int, int ) ), SLOT( onZoomedSlot() ) );
|
||||
@@ -245,6 +245,14 @@ void RiuSummaryQwtPlot::setLegendVisible( bool visible )
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryQwtPlot::setAxisIsLogarithmic( QwtPlot::Axis axis, bool logarithmic )
|
||||
{
|
||||
if ( m_wheelZoomer ) m_wheelZoomer->setAxisIsLogarithmic( axis, logarithmic );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user