src/EditProduct.cpp

changeset 227
7966bf14cc34
parent 225
448e4187cada
child 248
1a7a5dffba58
--- a/src/EditProduct.cpp	Fri May 20 22:06:06 2022 +0200
+++ b/src/EditProduct.cpp	Sat May 21 12:08:17 2022 +0200
@@ -653,6 +653,7 @@
 	product->birth = QDate::currentDate();
 	product->stage = product->inventory_reduced = PROD_STAGE_PLAN;
 	product->notes = "";
+	product->color_method = product->ibu_method = 0;
 	product->efficiency = 75;
 	product->eq_batch_size = product->batch_size = 20;
 	product->eq_boil_time = product->boil_time = 60;
@@ -678,9 +679,10 @@
 	product->package_volume = product->package_infuse_amount = product->package_infuse_abv = product->package_abv = product->package_ph = 0;
 	product->package_infuse_notes = "";
 	product->bottle_amount = product->bottle_carbonation = product->bottle_priming_amount = product->bottle_carbonation_temp = 0;
-	product->keg_amount = product->keg_carbonation = product->keg_priming_amount = product->keg_priming_water = 0;
-	product->keg_carbonation_temp = product->keg_pressure = 0;
-	product->bottle_priming_water = product->keg_priming_sugar = 0;
+	product->keg_amount = product->keg_carbonation = product->keg_priming_amount = product->keg_carbonation_temp = 0;
+	product->keg_pressure = 0;
+	product->bottle_priming_water = product->keg_priming_water = 0;
+	product->bottle_priming_sugar = product->keg_priming_sugar = 0;
 	product->taste_rate = 0;
 	product->taste_date = QDate();
 	product->taste_notes = product->taste_color = product->taste_transparency = product->taste_head = "";
@@ -1024,6 +1026,7 @@
 
     // All signals from tab "Generic"
     connect(ui->lockedEdit, &QCheckBox::stateChanged, this, &EditProduct::is_changed);
+    connect(ui->codeEdit, &QLineEdit::textChanged, this, &EditProduct::code_changed);
     connect(ui->nameEdit, &QLineEdit::textChanged, this, &EditProduct::name_changed);
     connect(ui->notesEdit, SIGNAL(textChanged()), this, SLOT(notes_changed()));
     connect(ui->typeEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::brew_type_changed);

mercurial