diff -r 96e239584db5 -r 91af2c697345 src/EditProduct.cpp --- a/src/EditProduct.cpp Mon May 02 11:48:12 2022 +0200 +++ b/src/EditProduct.cpp Mon May 02 16:40:41 2022 +0200 @@ -99,6 +99,15 @@ ui->brew_aerwithEdit->addItem(tr("Air")); ui->brew_aerwithEdit->addItem(tr("Oxygen")); + ui->bottle_sugarEdit->addItem(""); + ui->keg_sugarEdit->addItem(""); + query.prepare("SELECT name FROM inventory_fermentables WHERE type = '1' OR type = '3' ORDER BY name"); // Sugars or dry extract + query.exec(); + while (query.next()) { + ui->bottle_sugarEdit->addItem(query.value(0).toString()); + ui->keg_sugarEdit->addItem(query.value(0).toString()); + } + if (id >= 0) { query.prepare("SELECT * FROM products WHERE record = :recno"); query.bindValue(":recno", id); @@ -974,8 +983,33 @@ ui->tert_abvShow->setValue(Utils::abvol(product->brew_fermenter_sg, product->fg)); // Tab packaging. + ui->pack_dateEdit->setText(product->package_date.toString("dd MMM yyyy")); + ui->pack_carbloShow->setValue(product->st_carb_min); + ui->pack_carbhiShow->setValue(product->st_carb_max); + ui->pack_volumeEdit->setValue(product->package_volume); + ui->pack_addvolEdit->setValue(product->package_infuse_amount); + ui->pack_addabvEdit->setValue(product->package_infuse_abv); + ui->pack_notesEdit->setText(product->package_infuse_notes); + ui->pack_abvShow->setValue(product->package_abv); + ui->pack_phEdit->setValue(product->package_ph); + + ui->bottle_volumeEdit->setValue(product->bottle_amount); + ui->bottle_carbEdit->setValue(product->bottle_carbonation); + ui->bottle_sug_amountShow->setValue(product->bottle_priming_amount); + ui->bottle_sug_waterEdit->setValue(product->bottle_priming_water); + ui->bottle_tempEdit->setValue(product->bottle_carbonation_temp); // Tab taste. + ui->taste_dateEdit->setText(product->taste_date.toString("dd MMM yyyy")); + ui->taste_rateEdit->setValue(product->taste_rate); + ui->taste_notesEdit->setPlainText(product->taste_notes); + ui->taste_colorEdit->setText(product->taste_color); + ui->taste_transparencyEdit->setText(product->taste_transparency); + ui->taste_headEdit->setText(product->taste_head); + ui->taste_aromaEdit->setText(product->taste_aroma); + ui->taste_tasteEdit->setText(product->taste_taste); + ui->taste_mouthfeelEdit->setText(product->taste_mouthfeel); + ui->taste_aftertasteEdit->setText(product->taste_aftertaste); // All signals from tab "Generic" connect(ui->lockedEdit, &QCheckBox::stateChanged, this, &EditProduct::is_changed);