Immediately close all of Insight's child windows on InsightWindow::deactivate()
This commit is contained in:
@@ -172,9 +172,8 @@ namespace Bloom
|
||||
}
|
||||
|
||||
Logger::info("Shutting down Insight");
|
||||
if (this->mainWindow->isVisible()) {
|
||||
this->mainWindow->close();
|
||||
}
|
||||
|
||||
this->mainWindow->close();
|
||||
|
||||
if (this->workerThread != nullptr && this->workerThread->isRunning()) {
|
||||
Logger::debug("Stopping InsightWorker thread");
|
||||
|
||||
@@ -303,6 +303,7 @@ namespace Bloom
|
||||
}
|
||||
|
||||
void InsightWindow::closeEvent(QCloseEvent* event) {
|
||||
this->deactivate();
|
||||
|
||||
return QMainWindow::closeEvent(event);
|
||||
}
|
||||
@@ -714,7 +715,14 @@ namespace Bloom
|
||||
}
|
||||
|
||||
void InsightWindow::deactivate() {
|
||||
this->recordInsightSettings();
|
||||
const auto insightProjectSettings = this->insightProjectSettings;
|
||||
const auto childWidgets = this->findChildren<QWidget*>();
|
||||
|
||||
for (auto* widget : childWidgets) {
|
||||
if (widget->windowFlags() & Qt::Window) {
|
||||
widget->close();
|
||||
}
|
||||
}
|
||||
|
||||
if (this->selectedVariant != nullptr) {
|
||||
this->previouslySelectedVariant = *(this->selectedVariant);
|
||||
@@ -746,6 +754,7 @@ namespace Bloom
|
||||
|
||||
this->setUiDisabled(true);
|
||||
this->activated = false;
|
||||
this->insightProjectSettings = insightProjectSettings;
|
||||
}
|
||||
|
||||
void InsightWindow::adjustPanels() {
|
||||
|
||||
Reference in New Issue
Block a user