Skip to content

Commit

Permalink
cabana: fix wrong file path handling for recent files menu (commaai#3…
Browse files Browse the repository at this point in the history
…2969)

fix lambda
  • Loading branch information
deanlee authored Jul 12, 2024
1 parent 71dd1e2 commit e3e54fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/cabana/mainwin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ void MainWindow::updateRecentFileMenu() {

for (int i = 0; i < num_recent_files; ++i) {
QString text = tr("&%1 %2").arg(i + 1).arg(QFileInfo(settings.recent_files[i]).fileName());
open_recent_menu->addAction(text, this, [this, i=i](){ loadFile(settings.recent_files[i]); });
open_recent_menu->addAction(text, this, [this, file = settings.recent_files[i]]() { loadFile(file); });
}
}

Expand Down

0 comments on commit e3e54fb

Please sign in to comment.