src/EditProduct.cpp

changeset 530
a4d5daae8389
parent 529
7c9fb24bcc07
child 532
082786891630
--- a/src/EditProduct.cpp	Sun Jun 09 11:47:41 2024 +0200
+++ b/src/EditProduct.cpp	Sun Jun 09 15:20:26 2024 +0200
@@ -506,22 +506,19 @@
     ui->sp_phEdit->setButtonSymbols(product->calc_acid ? QAbstractSpinBox::UpDownArrows : QAbstractSpinBox::NoButtons);
     ui->sp_acidvolEdit->setReadOnly(product->calc_acid);
     ui->sp_acidvolEdit->setButtonSymbols(product->calc_acid ? QAbstractSpinBox::NoButtons : QAbstractSpinBox::UpDownArrows);
-    ui->sp_volEdit->setValue(product->sparge_volume);
     ui->sp_phEdit->setValue(product->sparge_ph);
     ui->sp_acidtypeEdit->setCurrentIndex(product->sparge_acid_type);
     ui->sp_acidpercEdit->setValue(product->sparge_acid_perc);
-    check_waters();
-
     /*
      * At this point, see if we must upgrade the whole water part.
      */
-//    if (product->sparge_source != 2) {
     if (product->sparge_volume != (product->brew_sparge_est + product->eq_HLT_deadspace)) {
-	qDebug() << "== Water settings upgrade ==";
-	qDebug() << " sp" << product->sparge_volume << "se" << product->brew_sparge_est;
-	qDebug() << " HLT " << product->eq_HLT_volume << " deadspace" << product->eq_HLT_deadspace;
-	qDebug() << " fixed sparge supply" << (product->brew_sparge_est + product->eq_HLT_deadspace);
+	qDebug() << "== Update sparge water supply from" << product->sparge_volume << "to" << (product->brew_sparge_est + product->eq_HLT_deadspace);
+	product->sparge_volume = product->brew_sparge_est + product->eq_HLT_deadspace;
+	is_changed();
     }
+    ui->brew_spargevolShow->setValue(product->sparge_volume);
+    check_waters();
 
     // Tab brewday.
     updateBrewday();
@@ -699,7 +696,6 @@
     connect(ui->w1_nameEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::w1_name_changed);
     connect(ui->w2_nameEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::w2_name_changed);
     connect(ui->w2_volEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditProduct::w2_volume_changed);
-    connect(ui->sp_volEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditProduct::sp_volume_changed);
     connect(ui->spargeGroup, SIGNAL(buttonClicked(int)), this, SLOT(sp_group_changed(int)));
     connect(ui->sp_acidtypeEdit, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &EditProduct::sp_type_changed);
     connect(ui->sp_phEdit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &EditProduct::sp_ph_changed);

mercurial