Skip to content

Commit

Permalink
Fix switching tab when onItemsLoaded() is overridden
Browse files Browse the repository at this point in the history
Redrawing GUI seems to get stuck when nested event loop is started while
waiting on `onItemsLoaded()`.

Solution is not to wait on the function to finish.

Fixes hluk#2788
  • Loading branch information
hluk committed Jul 25, 2024
1 parent 9bd883b commit 834c926
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3031,7 +3031,7 @@ void MainWindow::tabChanged(int current, int)
setTabOrder(ui->searchBar, c);

if (isScriptOverridden(ScriptOverrides::OnTabSelected)) {
runEventHandlerScript(
runScript(
QStringLiteral("onTabSelected()"),
createDataMap(mimeCurrentTab, c->tabName()));
}
Expand Down

0 comments on commit 834c926

Please sign in to comment.