mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4983 Fix drag zoom on Summary and Grid cross plots
This commit is contained in:
@@ -67,14 +67,12 @@ RiuGridCrossQwtPlot::RiuGridCrossQwtPlot( RimPlotInterface* plotDefinition, QWid
|
||||
m_zoomerLeft->setTrackerMode( QwtPicker::AlwaysOff );
|
||||
m_zoomerLeft->setTrackerPen( QColor( Qt::black ) );
|
||||
m_zoomerLeft->initMousePattern( 1 );
|
||||
m_zoomerLeft->setMousePattern( QwtEventPattern::MouseSelect1, Qt::LeftButton, Qt::ShiftModifier );
|
||||
|
||||
// Attach a zoomer for the right axis
|
||||
m_zoomerRight = new RiuQwtPlotZoomer( canvas() );
|
||||
m_zoomerRight->setAxis( xTop, yRight );
|
||||
m_zoomerRight->setTrackerMode( QwtPicker::AlwaysOff );
|
||||
m_zoomerRight->initMousePattern( 1 );
|
||||
m_zoomerRight->setMousePattern( QwtEventPattern::MouseSelect1, Qt::LeftButton, Qt::ShiftModifier );
|
||||
|
||||
// MidButton for the panning
|
||||
QwtPlotPanner* panner = new QwtPlotPanner( canvas() );
|
||||
@@ -541,6 +539,23 @@ void RiuGridCrossQwtPlot::applyFontSizeToOverlayItem( caf::TitledOverlayFrame* o
|
||||
overlayItem->setFont( cafFont.p() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiuGridCrossQwtPlot::isZoomerActive() const
|
||||
{
|
||||
return m_zoomerLeft->isActiveAndValid() || m_zoomerRight->isActiveAndValid();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridCrossQwtPlot::endZoomOperations()
|
||||
{
|
||||
m_zoomerLeft->endZoomOperation();
|
||||
m_zoomerRight->endZoomOperation();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user