From afe6fe3ef4c28a54030f1ee6aae68e2f0f20a6e3 Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 14 Aug 2022 23:24:29 +0100 Subject: [PATCH] Removed unnecessary state restoration of PanelWidgets --- .../UserInterfaces/InsightWindow/InsightWindow.cpp | 11 ----------- .../InsightWindow/Widgets/PanelWidget.cpp | 2 ++ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index 408c030c..bd78a3c7 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -384,17 +384,6 @@ namespace Bloom this->createPanes(); - const auto& lastLeftPanelState = this->insightProjectSettings.leftPanelState; - const auto& lastBottomPanelState = this->insightProjectSettings.bottomPanelState; - - if (lastLeftPanelState.has_value() && this->leftPanel != nullptr) { - this->leftPanel->setSize(lastLeftPanelState->size); - } - - if (lastBottomPanelState.has_value()) { - this->bottomPanel->setSize(lastBottomPanelState->size); - } - this->setUiDisabled(this->targetState != TargetState::STOPPED); this->activated = true; emit this->activatedSignal(); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/PanelWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/PanelWidget.cpp index 9922ec86..c1ec7b1b 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/PanelWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/PanelWidget.cpp @@ -33,6 +33,8 @@ namespace Bloom::Widgets layout->setContentsMargins(0, 0, 0, 0); this->setLayout(layout); } + + this->setSize(this->state.size); } void PanelWidget::setMinimumResize(int minimumResize) {