diff -r 684c6e74cc1b -r a9da2744609e src/MainWindow.cpp --- a/src/MainWindow.cpp Sun Feb 20 20:22:49 2022 +0100 +++ b/src/MainWindow.cpp Mon Feb 21 21:17:33 2022 +0100 @@ -19,6 +19,7 @@ #include "InventorySuppliers.h" #include "InventoryFermentables.h" #include "InventoryHops.h" +#include "InventoryYeasts.h" #include "Setup.h" #include "../ui/ui_MainWindow.h" #include "config.h" @@ -107,6 +108,24 @@ } +void MainWindow::fromInventoryYeasts() +{ + qDebug() << Q_FUNC_INFO; + delete InventoryYeastsWindow; + this->show(); +} + + +void MainWindow::on_actionYeasts_triggered() +{ + qDebug() << Q_FUNC_INFO; + InventoryYeastsWindow = new InventoryYeasts(this); + QObject::connect(InventoryYeastsWindow, SIGNAL(firstWindow()), this, SLOT(fromInventoryYeasts())); + this->hide(); // Close the main window + InventoryYeastsWindow->show(); // Show a second window +} + + void MainWindow::fromSetup() { qDebug() << Q_FUNC_INFO;