# HG changeset patch # User Michiel Broek # Date 1658239190 -7200 # Node ID 313cdeb309d237107b01965af33eedff0d5970f5 # Parent 6a615dbae216f1814e52cc891b9c5147285b85c1 Fixed overloaded perc_mashShow when the value is above the maxiumum. diff -r 6a615dbae216 -r 313cdeb309d2 src/EditProductTab3.cpp --- a/src/EditProductTab3.cpp Tue Jul 19 13:59:31 2022 +0200 +++ b/src/EditProductTab3.cpp Tue Jul 19 15:59:50 2022 +0200 @@ -403,7 +403,10 @@ ui->est_color2Edit->setStyleSheet(Utils::ebc_to_style(color)); ui->est_colorShow->setValue(color); - ui->perc_mashShow->setValue(round(product->mashs_kg / product->eq_mash_max * 100)); + if (round(product->mashs_kg / product->eq_mash_max * 100) > 120) + ui->perc_mashShow->setValue(120); + else + ui->perc_mashShow->setValue(round(product->mashs_kg / product->eq_mash_max * 100)); ui->mash_kgEdit->setValue(product->mashs_kg); ui->perc_sugarsShow->setValue(round(psugar)); ui->perc_caraShow->setValue(round(pcara));