--- a/src/MainWindow.cpp Sun Mar 20 21:24:13 2022 +0100 +++ b/src/MainWindow.cpp Sun Mar 20 21:39:06 2022 +0100 @@ -314,8 +314,11 @@ void MainWindow::fromProfileFerments() { qDebug() << Q_FUNC_INFO; + ui->mainStack->setCurrentIndex(-1); + ui->mainStack->removeWidget(ProfileFermentsWindow); delete ProfileFermentsWindow; - this->show(); + setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) ); + ui->menuBar->setVisible(true); } @@ -323,9 +326,11 @@ { qDebug() << Q_FUNC_INFO; ProfileFermentsWindow = new ProfileFerments(this); - QObject::connect(ProfileFermentsWindow, SIGNAL(firstWindow()), this, SLOT(fromProfileFerments())); - this->hide(); // Close the main window - ProfileFermentsWindow->show(); // Show a second window + int index = ui->mainStack->count(); + ui->mainStack->addWidget(ProfileFermentsWindow); + ui->mainStack->setCurrentIndex(index); + setWindowTitle(QString("BMSapp - %1 - Fermentation Profiles").arg(VERSIONSTRING)); + ui->menuBar->setVisible(false); }