diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index f02c35bc..408c030c 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -111,18 +111,18 @@ namespace Bloom this->refreshIoInspectionButton = this->header->findChild("refresh-io-inspection-btn"); // Create panel states - if (!this->insightProjectSettings.previousLeftPanelState.has_value()) { - this->insightProjectSettings.previousLeftPanelState = PanelState(); + if (!this->insightProjectSettings.leftPanelState.has_value()) { + this->insightProjectSettings.leftPanelState = PanelState(); } - if (!this->insightProjectSettings.previousBottomPanelState.has_value()) { - this->insightProjectSettings.previousBottomPanelState = PanelState(); + if (!this->insightProjectSettings.bottomPanelState.has_value()) { + this->insightProjectSettings.bottomPanelState = PanelState(); } this->leftMenuBar = this->container->findChild("left-side-menu-bar"); this->leftPanel = new PanelWidget( PanelWidgetType::LEFT, - this->insightProjectSettings.previousLeftPanelState.value(), + this->insightProjectSettings.leftPanelState.value(), this->container ); this->leftPanel->setObjectName("left-panel"); @@ -140,7 +140,7 @@ namespace Bloom this->bottomMenuBar = this->container->findChild("bottom-menu-bar"); this->bottomPanel = new PanelWidget( PanelWidgetType::BOTTOM, - this->insightProjectSettings.previousBottomPanelState.value(), + this->insightProjectSettings.bottomPanelState.value(), this->container ); this->bottomPanel->setObjectName("bottom-panel"); @@ -384,8 +384,8 @@ namespace Bloom this->createPanes(); - const auto& lastLeftPanelState = this->insightProjectSettings.previousLeftPanelState; - const auto& lastBottomPanelState = this->insightProjectSettings.previousBottomPanelState; + const auto& lastLeftPanelState = this->insightProjectSettings.leftPanelState; + const auto& lastBottomPanelState = this->insightProjectSettings.bottomPanelState; if (lastLeftPanelState.has_value() && this->leftPanel != nullptr) { this->leftPanel->setSize(lastLeftPanelState->size); diff --git a/src/ProjectSettings.cpp b/src/ProjectSettings.cpp index 881b15d7..adee8319 100644 --- a/src/ProjectSettings.cpp +++ b/src/ProjectSettings.cpp @@ -30,33 +30,33 @@ namespace Bloom } } - if (jsonObject.contains("previousLeftPanelState")) { - this->previousLeftPanelState = this->panelStateFromJson( - jsonObject.find("previousLeftPanelState")->toObject() + if (jsonObject.contains("leftPanelState")) { + this->leftPanelState = this->panelStateFromJson( + jsonObject.find("leftPanelState")->toObject() ); } - if (jsonObject.contains("previousBottomPanelState")) { - this->previousBottomPanelState = this->panelStateFromJson( - jsonObject.find("previousBottomPanelState")->toObject() + if (jsonObject.contains("bottomPanelState")) { + this->bottomPanelState = this->panelStateFromJson( + jsonObject.find("bottomPanelState")->toObject() ); } - if (jsonObject.contains("previousRegistersPaneState")) { + if (jsonObject.contains("registersPaneState")) { this->registersPaneState = this->paneStateFromJson( - jsonObject.find("previousRegistersPaneState")->toObject() + jsonObject.find("registersPaneState")->toObject() ); } - if (jsonObject.contains("previousRamInspectionPaneState")) { + if (jsonObject.contains("ramInspectionPaneState")) { this->ramInspectionPaneState = this->paneStateFromJson( - jsonObject.find("previousRamInspectionPaneState")->toObject() + jsonObject.find("ramInspectionPaneState")->toObject() ); } - if (jsonObject.contains("previousEepromInspectionPaneState")) { + if (jsonObject.contains("eepromInspectionPaneState")) { this->eepromInspectionPaneState = this->paneStateFromJson( - jsonObject.find("previousEepromInspectionPaneState")->toObject() + jsonObject.find("eepromInspectionPaneState")->toObject() ); } @@ -105,37 +105,37 @@ namespace Bloom insightObj.insert("memoryInspectionPaneSettings", memoryInspectionPaneSettingsObj); - if (this->previousLeftPanelState.has_value()) { + if (this->leftPanelState.has_value()) { insightObj.insert( - "previousLeftPanelState", - this->panelStateToJson(this->previousLeftPanelState.value()) + "leftPanelState", + this->panelStateToJson(this->leftPanelState.value()) ); } - if (this->previousBottomPanelState.has_value()) { + if (this->bottomPanelState.has_value()) { insightObj.insert( - "previousBottomPanelState", - this->panelStateToJson(this->previousBottomPanelState.value()) + "bottomPanelState", + this->panelStateToJson(this->bottomPanelState.value()) ); } if (this->registersPaneState.has_value()) { insightObj.insert( - "previousRegistersPaneState", + "registersPaneState", this->paneStateToJson(this->registersPaneState.value()) ); } if (this->ramInspectionPaneState.has_value()) { insightObj.insert( - "previousRamInspectionPaneState", + "ramInspectionPaneState", this->paneStateToJson(this->ramInspectionPaneState.value()) ); } if (this->eepromInspectionPaneState.has_value()) { insightObj.insert( - "previousEepromInspectionPaneState", + "eepromInspectionPaneState", this->paneStateToJson(this->eepromInspectionPaneState.value()) ); } diff --git a/src/ProjectSettings.hpp b/src/ProjectSettings.hpp index d82b4ede..33891151 100644 --- a/src/ProjectSettings.hpp +++ b/src/ProjectSettings.hpp @@ -20,8 +20,8 @@ namespace Bloom { public: std::optional mainWindowSize; - std::optional previousLeftPanelState; - std::optional previousBottomPanelState; + std::optional leftPanelState; + std::optional bottomPanelState; std::optional registersPaneState; std::optional ramInspectionPaneState; std::optional eepromInspectionPaneState;