- fix: Visibility for the interrupt action is not correctly updated.

This commit is contained in:
Roy Qu 2024-05-20 16:40:19 +08:00
parent 296bdfafeb
commit fd38aa4160
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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());