Skip to content

Commit

Permalink
Merge pull request supercollider#6450 from sonata-chen/develop
Browse files Browse the repository at this point in the history
scide: fix failing to open recent files if mnemonic is enabled
  • Loading branch information
dyfer authored Nov 9, 2024
2 parents 917faf1 + 7009ec0 commit 90dbcbd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions editors/sc-ide/widgets/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -849,16 +849,20 @@ void MainWindow::updateRecentDocsMenu() {

const QStringList& recent = mMain->documentManager()->recents();

foreach (const QString& path, recent)
mRecentDocsMenu->addAction(path);
foreach (const QString& path, recent) {
QAction* action = mRecentDocsMenu->addAction(path);
action->setData(QVariant(path));
}

if (!recent.isEmpty()) {
mRecentDocsMenu->addSeparator();
mRecentDocsMenu->addAction(mActions[ClearRecentDocs]);
}
}

void MainWindow::onOpenRecentDocument(QAction* action) { mMain->documentManager()->open(action->text()); }
void MainWindow::onOpenRecentDocument(QAction* action) {
mMain->documentManager()->open(action->data().value<QString>());
}

void MainWindow::onInterpreterStateChanged(QProcess::ProcessState state) {
switch (state) {
Expand Down

0 comments on commit 90dbcbd

Please sign in to comment.