From 8717b5f58140a8512ae5bc8c7f481d12d784a637 Mon Sep 17 00:00:00 2001 From: Nav Date: Wed, 22 Dec 2021 23:11:56 +0000 Subject: [PATCH] Destroying RAM and EEPROM inspection panes upon Insight deactivation --- .../InsightWindow/InsightWindow.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index 3f12eb40..a0cc4921 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -498,6 +498,22 @@ void InsightWindow::destroyPanes() { this->targetRegistersButton->setChecked(false); this->targetRegistersButton->setDisabled(true); } + + if (this->ramInspectionPane != nullptr) { + this->ramInspectionPane->deactivate(); + this->ramInspectionPane->deleteLater(); + this->bottomPanel->setVisible(false); + this->ramInspectionButton->setChecked(false); + this->ramInspectionButton->setDisabled(true); + } + + if (this->eepromInspectionPane != nullptr) { + this->eepromInspectionPane->deactivate(); + this->eepromInspectionPane->deleteLater(); + this->bottomPanel->setVisible(false); + this->eepromInspectionButton->setChecked(false); + this->eepromInspectionButton->setDisabled(true); + } } void InsightWindow::deactivate() {