src/MainWindow.cpp

changeset 66
72386c164f54
parent 65
2ef981980daa
child 68
abac28effb21
equal deleted inserted replaced
65:2ef981980daa 66:72386c164f54
66 66
67 67
68 void MainWindow::fromInventorySuppliers() 68 void MainWindow::fromInventorySuppliers()
69 { 69 {
70 qDebug() << Q_FUNC_INFO; 70 qDebug() << Q_FUNC_INFO;
71 qDebug() << "fromInventorySuppliers() start";
72 ui->mainStack->setCurrentIndex(-1); 71 ui->mainStack->setCurrentIndex(-1);
73 ui->mainStack->removeWidget(InventorySuppliersWindow); 72 ui->mainStack->removeWidget(InventorySuppliersWindow);
74 qDebug() << ui->mainStack->count();
75 delete InventorySuppliersWindow; 73 delete InventorySuppliersWindow;
76 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) ); 74 setWindowTitle( QString("BMSapp - %1").arg(VERSIONSTRING) );
77 qDebug() << "fromInventorySuppliers() done"; 75 ui->menuBar->setVisible(true);
78 } 76 }
79 77
80 78
81 void MainWindow::on_actionSuppliers_triggered() 79 void MainWindow::on_actionSuppliers_triggered()
82 { 80 {
83 qDebug() << Q_FUNC_INFO; 81 qDebug() << Q_FUNC_INFO;
84 82
85 InventorySuppliersWindow = new InventorySuppliers(this); 83 InventorySuppliersWindow = new InventorySuppliers(this);
84 int index = ui->mainStack->count();
86 ui->mainStack->addWidget(InventorySuppliersWindow); 85 ui->mainStack->addWidget(InventorySuppliersWindow);
87 qDebug() << ui->mainStack->count(); 86 ui->mainStack->setCurrentIndex(index);
88 ui->mainStack->setCurrentIndex(2);
89 setWindowTitle( QString("BMSapp - %1 - Inventory Suppliers").arg(VERSIONSTRING)); 87 setWindowTitle( QString("BMSapp - %1 - Inventory Suppliers").arg(VERSIONSTRING));
88 ui->menuBar->setVisible(false);
90 } 89 }
91 90
92 91
93 void MainWindow::fromInventoryFermentables() 92 void MainWindow::fromInventoryFermentables()
94 { 93 {

mercurial