Skip to content

Commit

Permalink
Fixed bug 1297007. Now when the rate slider direction preference is c…
Browse files Browse the repository at this point in the history
…hanged, the current rate is multiplied by -1 so that output is not effected.
  • Loading branch information
radkoff committed Jun 6, 2014
1 parent 8c98e6c commit 0eb6e90
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/dlgprefcontrols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,11 +442,21 @@ void DlgPrefControls::slotSetRateDir(int index) {
float dir = 1.;
if (index == 1)
dir = -1.;
float oldDir = m_rateDirControls[0]->get();

// Set rate direction for every group
foreach (ControlObjectThread* pControl, m_rateDirControls) {
pControl->slotSet(dir);
}

// If the setting was changed, ie the old direction is not equal to the new one,
// multiply the rate by -1 so the current sound does not change.
if(fabs(dir - oldDir) > 0.1) {
foreach (ControlObjectThread* pControl, m_rateControls) {
pControl->slotSet(-1 * pControl->get());
}
}

}

void DlgPrefControls::slotSetAllowTrackLoadToPlayingDeck(int) {
Expand Down

0 comments on commit 0eb6e90

Please sign in to comment.