--- a/src/MainWindow.cpp Sun Mar 20 19:44:32 2022 +0100 +++ b/src/MainWindow.cpp Sun Mar 20 20:45:58 2022 +0100 @@ -245,8 +245,11 @@ void MainWindow::fromProfileWaters() { qDebug() << Q_FUNC_INFO; + ui->mainStack->setCurrentIndex(-1); + ui->mainStack->removeWidget(ProfileWatersWindow); delete ProfileWatersWindow; - this->show(); + setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) ); + ui->menuBar->setVisible(true); } @@ -254,9 +257,11 @@ { qDebug() << Q_FUNC_INFO; ProfileWatersWindow = new ProfileWaters(this); - QObject::connect(ProfileWatersWindow, SIGNAL(firstWindow()), this, SLOT(fromProfileWaters())); - this->hide(); // Close the main window - ProfileWatersWindow->show(); // Show a second window + int index = ui->mainStack->count(); + ui->mainStack->addWidget(ProfileWatersWindow); + ui->mainStack->setCurrentIndex(index); + setWindowTitle(QString("BMSapp - %1 - Profile Waters").arg(VERSIONSTRING)); +// ui->menuBar->setVisible(false); }