src/PrinterDialog.cpp

changeset 341
1b1e2d4c1a3e
parent 340
b9af88bfe972
child 364
1efe29f64551
--- a/src/PrinterDialog.cpp	Thu Jul 07 14:57:24 2022 +0200
+++ b/src/PrinterDialog.cpp	Thu Jul 07 17:02:17 2022 +0200
@@ -68,7 +68,6 @@
 
     const QStringList y_unit({tr("pkg"), tr("gr"), tr("ml"), tr("ml"), tr("ml"), tr("ml"), tr("gr")});
     const QStringList color_method({ "Morey", "Mosher", "Daniels", "Halberstadt", "Naudts" });
-    const QStringList cooling_method({"-", tr("Emersion chiller"), tr("Counterflow chiller"), tr("Au bain marie"), tr("Natural") });
 
     painter.begin(printer);
     qreal y = 0;
@@ -1282,7 +1281,7 @@
 	    y += 25;
             painter.fillRect( 20, y,   430, 20, c_line1);
             painter.drawText( 20, y+4, 230, 20, Qt::AlignLeft, tr("Cooling method"));
-	    painter.drawText(250, y+4, 200, 20, Qt::AlignLeft, cooling_method[product->brew_cooling_method]);
+	    painter.drawText(250, y+4, 200, 20, Qt::AlignLeft, QCoreApplication::translate("ChillerType", g_chiller_types[product->brew_cooling_method]));
 	    y += 20;
             painter.fillRect( 20, y,   430, 20, c_line1);
             painter.drawText( 20, y+4, 230, 20, Qt::AlignLeft, tr("Cooling temperature"));
@@ -1722,7 +1721,7 @@
 	   lines = 3;
 	} else {
 	   lines = 5;
-	   if (product->brew_cooling_method == 1)
+	   if (product->brew_cooling_method == CHILLER_TYPE_EMERSION)
 		lines++;
 	   for (int i = 0; i < product->fermentables.size(); i++) {
 		if (product->fermentables.at(i).added == FERMENTABLE_ADDED_BOIL)
@@ -1756,7 +1755,7 @@
 				.arg(product->fermentables.at(j).amount * factor, 1, 'f', 3)
 				.arg(product->fermentables.at(j).name));
 		    }
-		    if (product->brew_cooling_method == 1)
+		    if (product->brew_cooling_method == CHILLER_TYPE_EMERSION)
 			checkLine(&painter, &y, QString(tr("Place emersion chiller at 10 minutes before end of boil")));
 		}
 		for (int j = 0; j < product->hops.size(); j++) {

mercurial