Tue, 19 Jul 2022 15:59:50 +0200
Fixed overloaded perc_mashShow when the value is above the maxiumum.
src/EditProductTab3.cpp | file | annotate | diff | comparison | revisions |
--- 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));