# HG changeset patch # User Michiel Broek # Date 1661016921 -7200 # Node ID 2ed66e586a52587aef83b2504432b5100ff944eb # Parent 3af1d728b02fba068988c10b3e0b644727f42311 Update tab packaging if beerstyle is changed. diff -r 3af1d728b02f -r 2ed66e586a52 src/EditProductTab1.cpp --- 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();