--- a/src/EditRecipeTab3.cpp Wed Apr 20 14:30:06 2022 +0200 +++ b/src/EditRecipeTab3.cpp Wed Apr 20 22:48:20 2022 +0200 @@ -202,7 +202,7 @@ hop_flavour = 100; if (hop_aroma > 100) hop_aroma = 100; - qDebug() << "ibu" << recipe->est_ibu << ibus << "flavour" << hop_flavour << "aroma" << hop_aroma; + qDebug() << "ibu" << recipe->est_ibu << ibus << "flavour" << hop_flavour << "aroma" << hop_aroma << "method" << recipe->ibu_method; recipe->est_ibu = ibus; ui->est_ibuEdit->setValue(recipe->est_ibu); @@ -632,3 +632,17 @@ } +void EditRecipe::adjustHops(double factor) +{ + double amount; + + if (recipe->hops.size() == 0) + return; + + for (int i = 0; i < recipe->hops.size(); i++) { + amount = recipe->hops.at(i).h_amount * factor; + recipe->hops[i].h_amount = amount; + } +} + +