src/InventoryFermentables.cpp

changeset 20
fcbbddcc22c1
parent 19
c94edc758a5b
child 34
5510352432f5
--- a/src/InventoryFermentables.cpp	Fri Feb 18 15:53:02 2022 +0100
+++ b/src/InventoryFermentables.cpp	Sat Feb 19 22:17:09 2022 +0100
@@ -15,7 +15,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #include "InventoryFermentables.h"
-//#include "EditSupplier.h"
+#include "EditFermentable.h"
 #include "../ui/ui_InventoryFermentables.h"
 #include "config.h"
 #include "bmsapp.h"
@@ -36,7 +36,7 @@
 {
     QString w;
 
-    qDebug() << "slot"  << Q_FUNC_INFO;
+    qDebug() << "InventoryFermentables reload";
 
     QSqlQuery query("SELECT * FROM inventory_fermentables ORDER BY supplier,name");
     const QStringList labels({tr("Origin"), tr("Supplier"), tr("Name"), tr("Type"), tr("Grain"), tr("Color"), tr("Yield"), tr("Stock"), tr("Edit")});
@@ -62,7 +62,6 @@
     QTableWidgetItem *rightitem = new QTableWidgetItem();
     rightitem->setTextAlignment(Qt::AlignRight);
 
-    qDebug() << query.record().count() << query.size();
     query.first();
     for (int ridx = 0 ; ridx < query.size() ; ridx++ ) {
 	ui->tableFermentables->setItem(ridx, 0, new QTableWidgetItem(query.value(6).toString()));
@@ -119,11 +118,11 @@
 {
     qDebug() << "InventoryFermentables edit:" << recno;
 
-//    EditSupplier dialog(recno, this);
+    EditFermentable dialog(recno, this);
     /* Signal from editor if a refresh is needed */
-//    connect(&dialog, SIGNAL(entry_changed()), this, SLOT(refreshTable()));
-//    dialog.setModal(true);
-//    dialog.exec();
+    connect(&dialog, SIGNAL(entry_changed()), this, SLOT(refreshTable()));
+    dialog.setModal(true);
+    dialog.exec();
 }
 
 

mercurial