bug fix with the fader grouping: if you move one fader quickly to the top and another max out, it happened that the other fader was not exactly on max but a bit below

This commit is contained in:
Volker Fischer 2020-07-02 17:55:59 +02:00
parent f22762d7ef
commit 45eef32b7c
2 changed files with 13 additions and 11 deletions

View File

@ -7,6 +7,7 @@
- bug fix: grouping faders in the client should be proportional (see discussion in #202, #419)
TODO fix: if group, set one fader to 0, set mute, move fader up, unmute -> no grouping anymore
TODO bug fix: incorrect selection of UI language (#408) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-> note that for the 3.5.8 bug fix release we went back to the original translation code (e.g. no pt_BR!)

View File

@ -347,24 +347,25 @@ void CChannelFader::SetFaderLevel ( const double dLevel,
const bool bIsGroupUpdate )
{
// first make a range check
if ( ( dLevel >= 0 ) && ( dLevel <= AUD_MIX_FADER_MAX ) )
if ( dLevel >= 0 )
{
// we set the new fader level in the GUI (slider control) and also tell the
// server about the change (block the signal of the fader since we want to
// call SendFaderLevelToServer with a special additional parameter)
pFader->blockSignals ( true );
pFader->setValue ( MathUtils::round ( dLevel ) );
pFader->setValue ( min ( AUD_MIX_FADER_MAX, MathUtils::round ( dLevel ) ) );
pFader->blockSignals ( false );
SendFaderLevelToServer ( dLevel, bIsGroupUpdate );
}
else if ( dLevel >= 0 )
{
// If the level is above the maximum, we have to store it for the purpose
// of group fader movement. If you move a fader which has lower volume than
// this one and this clips at max, we want to retain the ratio between this
// fader and the others in the group.
dPreviousFaderLevel = dLevel;
SendFaderLevelToServer ( min ( static_cast<double> ( AUD_MIX_FADER_MAX ), dLevel ), bIsGroupUpdate );
if ( dLevel > AUD_MIX_FADER_MAX )
{
// If the level is above the maximum, we have to store it for the purpose
// of group fader movement. If you move a fader which has lower volume than
// this one and this clips at max, we want to retain the ratio between this
// fader and the others in the group.
dPreviousFaderLevel = dLevel;
}
}
}