Qt5-specific: Fix crash after Ctrl+Tab when tabs navigation in MRU order is turned on in preferences

This commit is contained in:
Abs62 2019-11-16 16:01:13 +03:00
parent df92b38ea8
commit 1cef1a8733

View file

@ -1739,7 +1739,10 @@ void MainWindow::ctrlReleased()
{
if (tabListMenu->actions().size() > 1)
{
ui.tabWidget->setCurrentIndex(tabListMenu->activeAction()->data().toInt());
QAction *act = tabListMenu->activeAction();
if( act == 0 )
act = tabListMenu->actions().at( 1 );
ui.tabWidget->setCurrentIndex( act->data().toInt() );
}
tabListMenu->hide();
}