From 750673d8672f1aa26c25c9e806137fdb155cdfd3 Mon Sep 17 00:00:00 2001 From: Nav Date: Tue, 30 May 2023 00:40:30 +0100 Subject: [PATCH] Corrected Insight window size restoration bug --- .../InsightWindow/InsightWindow.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp index ecff277f..41e6b129 100644 --- a/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/InsightWindow.cpp @@ -49,18 +49,19 @@ namespace Bloom this->setObjectName("main-window"); this->setWindowTitle("Bloom Insight"); - const auto defaultMinimumSize = QSize(1000, 500); + auto windowSize = QSize(1000, 500); if (this->insightProjectSettings.mainWindowSize.has_value()) { - this->setMinimumSize( - std::max(this->insightProjectSettings.mainWindowSize->width(), defaultMinimumSize.width()), - std::max(this->insightProjectSettings.mainWindowSize->height(), defaultMinimumSize.height()) + windowSize = QSize( + std::max(this->insightProjectSettings.mainWindowSize->width(), windowSize.width()), + std::max(this->insightProjectSettings.mainWindowSize->height(), windowSize.height()) ); - - } else { - this->setMinimumSize(defaultMinimumSize); } + this->setFixedSize(windowSize); + this->setMaximumSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX); + this->setMinimumSize(0, 0); + auto mainWindowUiFile = QFile( QString::fromStdString(Services::PathService::compiledResourcesPath() + "/src/Insight/UserInterfaces/InsightWindow/UiFiles/InsightWindow.ui" @@ -167,7 +168,6 @@ namespace Bloom auto* footerLayout = this->footer->findChild(); footerLayout->insertWidget(2, this->taskIndicator); - const auto windowSize = this->size(); this->windowContainer->setFixedSize(windowSize); this->layoutContainer->setFixedSize(windowSize);