src/EditProductTab7.cpp

changeset 525
e6a4a3a29584
parent 464
1fed3ff9a64e
child 528
50b057ae50aa
equal deleted inserted replaced
524:6fb367b13ffb 525:e6a4a3a29584
451 void EditProduct::stepph_changed(double val) 451 void EditProduct::stepph_changed(double val)
452 { 452 {
453 qDebug() << "stepph_changed" << product->mashs_row << val; 453 qDebug() << "stepph_changed" << product->mashs_row << val;
454 454
455 if (product->mashs.at(product->mashs_row).step_ph == 0) { 455 if (product->mashs.at(product->mashs_row).step_ph == 0) {
456 if (product->mashs_row == 0) { 456 if ((product->mashs_row == 0) || ((product->mashs_row > 0) && (product->mashs.at(product->mashs_row - 1).step_ph == 0))) {
457 /* 457 /*
458 * Jump start at 5.0pH 458 * Jump start at 5.0pH
459 */ 459 */
460 product->mashs[product->mashs_row].step_ph = 5.0; 460 product->mashs[product->mashs_row].step_ph = 5.0;
461 } else { 461 } else {
640 stepphEdit->setGeometry(QRect(160, 130, 121, 24)); 640 stepphEdit->setGeometry(QRect(160, 130, 121, 24));
641 stepphEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter); 641 stepphEdit->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
642 stepphEdit->setDecimals(2); 642 stepphEdit->setDecimals(2);
643 stepphEdit->setMaximum(14.0); 643 stepphEdit->setMaximum(14.0);
644 stepphEdit->setAccelerated(true); 644 stepphEdit->setAccelerated(true);
645 stepphEdit->setSingleStep(0.1); 645 stepphEdit->setSingleStep(0.01);
646 stepphEdit->setValue(product->mashs.at(product->mashs_row).step_ph); 646 stepphEdit->setValue(product->mashs.at(product->mashs_row).step_ph);
647 647
648 /* 648 /*
649 * SG or Brix, both can be used to enter the SG. 649 * SG or Brix, both can be used to enter the SG.
650 */ 650 */

mercurial