src/MainWindow.cpp

changeset 66
72386c164f54
parent 65
2ef981980daa
child 68
abac28effb21
--- a/src/MainWindow.cpp	Sat Mar 19 22:59:11 2022 +0100
+++ b/src/MainWindow.cpp	Sun Mar 20 10:29:57 2022 +0100
@@ -68,13 +68,11 @@
 void MainWindow::fromInventorySuppliers()
 {
     qDebug() << Q_FUNC_INFO;
-    qDebug() << "fromInventorySuppliers() start";
     ui->mainStack->setCurrentIndex(-1);
     ui->mainStack->removeWidget(InventorySuppliersWindow);
-    qDebug() << ui->mainStack->count();
     delete InventorySuppliersWindow;
     setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) );
-    qDebug() << "fromInventorySuppliers() done";
+    ui->menuBar->setVisible(true);
 }
 
 
@@ -83,10 +81,11 @@
     qDebug() << Q_FUNC_INFO;
 
     InventorySuppliersWindow = new InventorySuppliers(this);
+    int index = ui->mainStack->count();
     ui->mainStack->addWidget(InventorySuppliersWindow);
-    qDebug() << ui->mainStack->count();
-    ui->mainStack->setCurrentIndex(2);
+    ui->mainStack->setCurrentIndex(index);
     setWindowTitle( QString("BMSapp - %1 - Inventory Suppliers").arg(VERSIONSTRING));
+    ui->menuBar->setVisible(false);
 }
 
 

mercurial