Skip to content

Commit

Permalink
Update MashDesigner.cpp
Browse files Browse the repository at this point in the history
Add explanatory comment
  • Loading branch information
matty0ung authored Oct 25, 2023
1 parent 9a5a74c commit e203fb0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/MashDesigner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ 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::valueChanged, this, &MashDesigner::updateTempSlider);
// Update amount slider when we move temp slider.
//
// 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::valueChanged, this, &MashDesigner::updateAmtSlider);
// Update tun fullness bar when either slider moves.
connect(horizontalSlider_amount, &QAbstractSlider::valueChanged, this, &MashDesigner::updateFullness);
Expand Down

0 comments on commit e203fb0

Please sign in to comment.