Show kcal/l in the first tab

Sun, 03 Apr 2022 22:11:45 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 03 Apr 2022 22:11:45 +0200
changeset 104
c02dfb7bb2f9
parent 103
6da4e93b6ceb
child 105
e79079bf013d

Show kcal/l in the first tab

src/EditRecipe.cpp file | annotate | diff | comparison | revisions
--- a/src/EditRecipe.cpp	Sun Apr 03 22:02:12 2022 +0200
+++ b/src/EditRecipe.cpp	Sun Apr 03 22:11:45 2022 +0200
@@ -606,7 +606,7 @@
      */
     double alc = 1881.22 * fg * (og - fg) / (1.775 - og);
     double sug = 3550 * fg * (0.1808 * og + 0.8192 * fg - 1.0004);
-    qDebug() << "  kcal" << round((alc + sug) / (12 * 0.0295735296));
+    ui->calEdit->setValue(round((alc + sug) / (12 * 0.0295735296)));
 
     // If to_100 then make all amount fields t/o and percent fields r/w
 

mercurial