diff --git a/NEWS.md b/NEWS.md index 2c38a7ae..2139c823 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,7 @@ Red Panda C++ Version 3.1 - fix: Shouldn't warn "Makefile is modifed" when "View Makefile" is rerun. - fix: In compiler options page, Can't save default stack size to 0MB. - enhancement: Support national flag emojis. + - fix: Visibility for the interrupt action is not correctly updated. Red Panda C++ Version 3.0 diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 92aa1090..67f6096c 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -5265,6 +5265,8 @@ void MainWindow::onEditorTabContextMenu(QTabWidget* tabWidget, const QPoint &pos void MainWindow::disableDebugActions() { + if (mDebugger != nullptr) + ui->actionInterrupt->setVisible(mDebugger->useDebugServer()); ui->actionInterrupt->setEnabled(false); ui->actionStep_Into->setEnabled(false); ui->actionStep_Over->setEnabled(false); @@ -5281,6 +5283,7 @@ void MainWindow::disableDebugActions() void MainWindow::enableDebugActions() { + ui->actionInterrupt->setVisible(mDebugger->useDebugServer()); ui->actionInterrupt->setEnabled(mDebugger->useDebugServer() && mDebugger->inferiorRunning()); ui->actionStep_Into->setEnabled(!mDebugger->inferiorRunning()); ui->actionStep_Over->setEnabled(!mDebugger->inferiorRunning());