cabana: fix wrong file path handling for recent files menu (#32969)

fix lambda
pull/32975/head
Dean Lee 10 months ago committed by GitHub
parent 71dd1e2ff6
commit e3e54fb28b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      tools/cabana/mainwin.cc

@ -487,7 +487,7 @@ void MainWindow::updateRecentFileMenu() {
for (int i = 0; i < num_recent_files; ++i) { for (int i = 0; i < num_recent_files; ++i) {
QString text = tr("&%1 %2").arg(i + 1).arg(QFileInfo(settings.recent_files[i]).fileName()); 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); });
} }
} }

Loading…
Cancel
Save