src/EditProductTab3.cpp

changeset 363
313cdeb309d2
parent 305
35ce719998e1
child 369
09d3d8d18f97
--- 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));

mercurial