Merge pull request #8654 from OPM/filter_wheelevents

Summary Multiplot: page scroll and zoom fixes
This commit is contained in:
jonjenssen
2022-03-10 13:13:44 +01:00
committed by GitHub
parent 0d45b88d09
commit c9b762fb16
13 changed files with 244 additions and 11 deletions

View File

@@ -1687,11 +1687,16 @@ bool RiaGuiApplication::notify( QObject* receiver, QEvent* event )
{
if ( event->type() == QEvent::KeyPress )
{
QKeyEvent* keyEvent = static_cast<QKeyEvent*>( event );
RimPlotWindow* plot = dynamic_cast<RimPlotWindow*>( activePlotWindow() );
QKeyEvent* keyEvent = static_cast<QKeyEvent*>( event );
RimPlotWindow* plot = dynamic_cast<RimPlotWindow*>( activePlotWindow() );
if ( plot ) done = plot->handleGlobalKeyEvent( keyEvent );
}
else if ( event->type() == QEvent::Wheel )
{
QWheelEvent* wheelEvent = static_cast<QWheelEvent*>( event );
RimPlotWindow* plot = dynamic_cast<RimPlotWindow*>( activePlotWindow() );
if ( plot ) done = plot->handleGlobalWheelEvent( wheelEvent );
}
if ( !done )
{
done = QApplication::notify( receiver, event );