From 1d48991d2093218cfcd334fea9676afc2f2938e8 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Mon, 3 Jan 2022 20:18:53 +0800 Subject: [PATCH] - fix: debugger's "continue" button not correctly disabled --- NEWS.md | 1 + RedPandaIDE/debugger.cpp | 2 +- RedPandaIDE/mainwindow.cpp | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NEWS.md b/NEWS.md index 47bc23d9..fc564651 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,7 @@ Red Panda C++ Version 0.12.6 - fix: problem cases doesn't use svg icons - fix: problem's title info not updated after running cases - enhancement: open the corresponding source file from problem's context menu + - fix: debugger's "continue" button not correctly disabled Red Panda C++ Version 0.12.5 - fix: compile error in linux diff --git a/RedPandaIDE/debugger.cpp b/RedPandaIDE/debugger.cpp index e607aa63..89d02b35 100644 --- a/RedPandaIDE/debugger.cpp +++ b/RedPandaIDE/debugger.cpp @@ -1464,7 +1464,7 @@ QVariant BreakpointModel::headerData(int section, Qt::Orientation orientation, i if (orientation == Qt::Horizontal && role == Qt::DisplayRole) { switch(section) { case 0: - return tr("Type"); + return tr("Filename"); case 1: return tr("Line"); case 2: diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 0633e75b..54e5761b 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -611,6 +611,7 @@ void MainWindow::applySettings() if (idxProblemSet>=0) ui->tabInfos->removeTab(idxProblemSet); } + ui->actionInterrupt->setVisible(pSettings->debugger().useGDBServer()); //icon sets for editors updateEditorSettings(); updateDebuggerSettings(); @@ -3338,13 +3339,13 @@ void MainWindow::disableDebugActions() void MainWindow::enableDebugActions() { - ui->actionInterrupt->setEnabled(mDebugger->inferiorRunning()); + if (pSettings->debugger().useGDBServer()) + ui->actionInterrupt->setEnabled(mDebugger->inferiorRunning()); ui->actionStep_Into->setEnabled(!mDebugger->inferiorRunning()); ui->actionStep_Over->setEnabled(!mDebugger->inferiorRunning()); ui->actionStep_Out->setEnabled(!mDebugger->inferiorRunning()); ui->actionRun_To_Cursor->setEnabled(!mDebugger->inferiorRunning()); - if (pSettings->debugger().useGDBServer()) - ui->actionContinue->setEnabled(!mDebugger->inferiorRunning()); + ui->actionContinue->setEnabled(!mDebugger->inferiorRunning()); ui->cbEvaluate->setEnabled(!mDebugger->inferiorRunning()); ui->cbMemoryAddress->setEnabled(!mDebugger->inferiorRunning()); if (mCPUDialog) {