#11394 Make sure single click for source stepper selected item once

This commit is contained in:
Magne Sjaastad
2024-04-24 07:15:05 +02:00
parent f3cf849458
commit ff12d48ff2

View File

@@ -651,23 +651,24 @@ std::vector<caf::PdmFieldHandle*> RimSummaryMultiPlot::fieldsToShowInToolbar()
//--------------------------------------------------------------------------------------------------
bool RimSummaryMultiPlot::handleGlobalKeyEvent( QKeyEvent* keyEvent )
{
if ( !RimSummaryPlotControls::handleKeyEvents( m_sourceStepping(), keyEvent ) )
{
if ( isMouseCursorInsidePlot() )
bool isHandled = RimSummaryPlotControls::handleKeyEvents( m_sourceStepping(), keyEvent );
if ( !isHandled && isMouseCursorInsidePlot() )
{
if ( keyEvent->key() == Qt::Key_PageUp )
{
m_viewer->goToPrevPage();
return true;
}
else if ( keyEvent->key() == Qt::Key_PageDown )
if ( keyEvent->key() == Qt::Key_PageDown )
{
m_viewer->goToNextPage();
return true;
}
}
}
return false;
return isHandled;
}
//--------------------------------------------------------------------------------------------------