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

This commit is contained in:
Magne Sjaastad committed 2024-04-25 09:22:43 +02:00
1 parent f3cf849458
commit ff12d48ff2
1 file changed
+7 -6
@@ -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;
}
//--------------------------------------------------------------------------------------------------