src/EditProductTab7.cpp

changeset 219
fa7cad488e27
parent 202
49ec4fdee5a6
child 257
cfba041bdaee
equal deleted inserted replaced
218:725da10db56c 219:fa7cad488e27
507 void EditProduct::stepbrix_changed(double val) 507 void EditProduct::stepbrix_changed(double val)
508 { 508 {
509 qDebug() << "stepbrix_changed" << product->mashs_row << val << "SG" << Utils::brix_to_sg(val); 509 qDebug() << "stepbrix_changed" << product->mashs_row << val << "SG" << Utils::brix_to_sg(val);
510 510
511 if ((product->mashs.at(product->mashs_row).step_sg == 0) && (product->mashs_row > 0)) { 511 if ((product->mashs.at(product->mashs_row).step_sg == 0) && (product->mashs_row > 0)) {
512 /* If not thhe first step, and SG was not set, pickip previous step. */ 512 /* If not the first step, and SG was not set, pickup previous step. */
513 val = Utils::sg_to_brix(product->mashs.at(product->mashs_row - 1).step_sg); 513 val = Utils::sg_to_brix(product->mashs.at(product->mashs_row - 1).step_sg);
514 const QSignalBlocker blocker2(brixEdit); 514 const QSignalBlocker blocker2(brixEdit);
515 brixEdit->setValue(val); 515 brixEdit->setValue(val);
516 } 516 }
517 product->mashs[product->mashs_row].step_sg = Utils::brix_to_sg(val); 517 product->mashs[product->mashs_row].step_sg = Utils::brix_to_sg(val);

mercurial