closing the menu before triggering the operation

This commit is contained in:
Uwe Rathmann 2023-05-10 09:14:25 +02:00
parent 63b594a3c2
commit eb2fcbe6c2

View File

@ -290,8 +290,8 @@ void QskMenu::keyReleaseEvent( QKeyEvent* )
if ( m_data->currentIndex >= 0 ) if ( m_data->currentIndex >= 0 )
{ {
trigger( m_data->currentIndex );
close(); close();
trigger( m_data->currentIndex );
} }
} }
} }
@ -368,8 +368,8 @@ void QskMenu::mouseReleaseEvent( QMouseEvent* event )
if ( ( index >= 0 ) if ( ( index >= 0 )
&& ( index == indexAtPosition( qskMousePosition( event ) ) ) ) && ( index == indexAtPosition( qskMousePosition( event ) ) ) )
{ {
trigger( m_data->currentIndex );
close(); close();
trigger( m_data->currentIndex );
} }
} }