Update tab packaging if beerstyle is changed.

Sat, 20 Aug 2022 19:35:21 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 20 Aug 2022 19:35:21 +0200
changeset 403
2ed66e586a52
parent 402
3af1d728b02f
child 404
47f1259378fe

Update tab packaging if beerstyle is changed.

src/EditProductTab1.cpp file | annotate | diff | comparison | revisions
--- a/src/EditProductTab1.cpp	Fri Aug 19 17:16:55 2022 +0200
+++ b/src/EditProductTab1.cpp	Sat Aug 20 19:35:21 2022 +0200
@@ -113,13 +113,15 @@
     ui->st_catnrEdit->setText(QString("%1").arg(product->st_category_number));
     ui->st_typeEdit->setText(QCoreApplication::translate("BeerType", g_style_types[product->st_type]));
 
-    ui->est_ogShow->setRange(query.value(7).toDouble(), query.value(8).toDouble());
-    ui->est_fgShow->setRange(query.value(9).toDouble(), query.value(10).toDouble());
-    ui->est_ibuShow->setRange(query.value(11).toDouble(), query.value(12).toDouble());
-    ui->est_colorShow->setRange(query.value(13).toDouble(), query.value(14).toDouble());
-    ui->est_bottle_co2Show->setRange(query.value(15).toDouble(), query.value(16).toDouble());
-    ui->est_kegs_co2Show->setRange(query.value(15).toDouble(), query.value(16).toDouble());
-    ui->est_abvShow->setRange(query.value(17).toDouble(), query.value(18).toDouble());
+    ui->est_ogShow->setRange(product->st_og_min, product->st_og_max);
+    ui->est_fgShow->setRange(product->st_fg_min, product->st_fg_max);
+    ui->est_ibuShow->setRange(product->st_ibu_min, product->st_ibu_max);
+    ui->est_colorShow->setRange(product->st_color_min, product->st_color_max);
+    ui->est_bottle_co2Show->setRange(product->st_carb_min, product->st_carb_max);
+    ui->est_kegs_co2Show->setRange(product->st_carb_min, product->st_carb_max);
+    ui->pack_carbloShow->setValue(product->st_carb_min);
+    ui->pack_carbhiShow->setValue(product->st_carb_max);
+    ui->est_abvShow->setRange(product->st_abv_min, product->st_abv_max);
 
     calcStyle();
     is_changed();

mercurial