Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve keyboard usage and reduce boilsize by deadspace. #776

Merged
merged 4 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions src/MashDesigner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,23 @@ MashDesigner::MashDesigner(QWidget * parent) : QDialog {parent},
this->label_zeroWort->setText(Measurement::displayAmount(Measurement::Amount{0, Measurement::Units::liters}));

// Update temp slider when we move amount slider.
connect(horizontalSlider_amount, &QAbstractSlider::sliderMoved, this, &MashDesigner::updateTempSlider);
//
// Here and below, we connect to valueChanged rather than sliderMoved as, otherwise, we don't receive any signal if
// the keyboard is used to move the slider.
connect(horizontalSlider_amount, &QAbstractSlider::valueChanged, this, &MashDesigner::updateTempSlider);
// Update amount slider when we move temp slider.
connect(horizontalSlider_temp, &QAbstractSlider::sliderMoved, this, &MashDesigner::updateAmtSlider);
connect(horizontalSlider_temp, &QAbstractSlider::valueChanged, this, &MashDesigner::updateAmtSlider);
// Update tun fullness bar when either slider moves.
connect(horizontalSlider_amount, &QAbstractSlider::sliderMoved, this, &MashDesigner::updateFullness);
connect(horizontalSlider_temp, &QAbstractSlider::sliderMoved, this, &MashDesigner::updateFullness);
connect(horizontalSlider_amount, &QAbstractSlider::valueChanged, this, &MashDesigner::updateFullness);
connect(horizontalSlider_temp, &QAbstractSlider::valueChanged, this, &MashDesigner::updateFullness);
// Update amount/temp text when sliders move.
connect(horizontalSlider_amount, &QAbstractSlider::sliderMoved, this, &MashDesigner::updateAmt);
connect(horizontalSlider_amount, &QAbstractSlider::sliderMoved, this, &MashDesigner::updateTemp);
connect(horizontalSlider_temp, &QAbstractSlider::sliderMoved, this, &MashDesigner::updateAmt);
connect(horizontalSlider_temp, &QAbstractSlider::sliderMoved, this, &MashDesigner::updateTemp);
connect(horizontalSlider_amount, &QAbstractSlider::valueChanged, this, &MashDesigner::updateAmt);
connect(horizontalSlider_amount, &QAbstractSlider::valueChanged, this, &MashDesigner::updateTemp);
connect(horizontalSlider_temp, &QAbstractSlider::valueChanged, this, &MashDesigner::updateAmt);
connect(horizontalSlider_temp, &QAbstractSlider::valueChanged, this, &MashDesigner::updateTemp);
// Update collected wort when sliders move.
connect(horizontalSlider_amount, &QAbstractSlider::sliderMoved, this, &MashDesigner::updateCollectedWort);
connect(horizontalSlider_temp, &QAbstractSlider::sliderMoved, this, &MashDesigner::updateCollectedWort);
connect(horizontalSlider_amount, &QAbstractSlider::valueChanged, this, &MashDesigner::updateCollectedWort);
connect(horizontalSlider_temp, &QAbstractSlider::valueChanged, this, &MashDesigner::updateCollectedWort);
// Save the target temp whenever it's changed.
connect(lineEdit_temp, &SmartLineEdit::textModified, this, &MashDesigner::saveTargetTemp);
// Move to next step.
Expand Down
2 changes: 1 addition & 1 deletion src/model/Recipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2785,7 +2785,7 @@ double Recipe::targetCollectedWortVol_l() {
}

if (equipment()) {
return boilSize_l() - equipment()->topUpKettle_l() - postMashAdditionVolume_l;
return boilSize_l() - equipment()->lauterDeadspace_l() - equipment()->topUpKettle_l() - postMashAdditionVolume_l;
} else {
return boilSize_l() - postMashAdditionVolume_l;
}
Expand Down