another merge fixes, still not working correctly

This commit is contained in:
Volker Fischer 2020-06-20 19:49:58 +02:00
parent fc4816aec1
commit 7f037f21e2
2 changed files with 8 additions and 24 deletions

View file

@ -183,9 +183,6 @@ CChannelFader::CChannelFader ( QWidget* pNW )
QObject::connect ( pcbSolo, &QCheckBox::stateChanged, QObject::connect ( pcbSolo, &QCheckBox::stateChanged,
this, &CChannelFader::soloStateChanged ); this, &CChannelFader::soloStateChanged );
QObject::connect ( pcbGroup, &QCheckBox::stateChanged,
this, &CChannelFader::OnSelectStateChanged );
} }
void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign ) void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign )
@ -340,7 +337,6 @@ void CChannelFader::Reset()
bOtherChannelIsSolo = false; bOtherChannelIsSolo = false;
bIsMyOwnFader = false; bIsMyOwnFader = false;
bIsSelected = false;
} }
void CChannelFader::SetFaderLevel ( const int iLevel ) void CChannelFader::SetFaderLevel ( const int iLevel )
@ -626,12 +622,6 @@ double CChannelFader::CalcFaderGain ( const int value )
} }
} }
void CChannelFader::OnSelectStateChanged ( int value )
{
// call selecting function
SetSelected ( static_cast<Qt::CheckState> ( value ) == Qt::Checked );
}
/******************************************************************************\ /******************************************************************************\
* CAudioMixerBoard * * CAudioMixerBoard *
@ -1041,22 +1031,19 @@ void CAudioMixerBoard::UpdateGainValue ( const int iChannelIdx,
// if this fader is selected, all other selected must be updated as well // if this fader is selected, all other selected must be updated as well
if ( vecpChanFader[iChannelIdx]->IsSelect() ) if ( vecpChanFader[iChannelIdx]->IsSelect() )
{ {
for ( int i = MAX_NUM_CHANNELS - 1; i >= 0; i-- ) for ( int i = 0; i < MAX_NUM_CHANNELS; i++ )
{ {
// update rest of faders selected // update rest of faders selected
if ( vecpChanFader[i]->IsSelect() ) if ( vecpChanFader[i]->IsVisible() && vecpChanFader[i]->IsSelect() && ( i != iChannelIdx ) )
{ {
if ( i != iChannelIdx ) // temporaly unselect so it does not repeat this again and again...
{ vecpChanFader[i]->SetFaderIsSelect ( false );
// temporaly unselect so it does not repeat this again and again...
vecpChanFader[i]->SetFaderIsSelect ( false );
// "move" faders with moving fader level // "move" faders with moving fader level
vecpChanFader[i]->SetFaderLevel ( vecpChanFader[i]->GetFaderLevel() + iDiffLevel ); vecpChanFader[i]->SetFaderLevel ( vecpChanFader[i]->GetFaderLevel() + iDiffLevel );
// back to selected status // back to selected status
vecpChanFader[i]->SetFaderIsSelect ( true ); vecpChanFader[i]->SetFaderIsSelect ( true );
}
} }
} }
} }

View file

@ -83,7 +83,6 @@ protected:
void SendFaderLevelToServer ( const int iLevel ); void SendFaderLevelToServer ( const int iLevel );
void SendPanValueToServer ( const int iPan ); void SendPanValueToServer ( const int iPan );
void SetupFaderTag ( const ESkillLevel eSkillLevel ); void SetupFaderTag ( const ESkillLevel eSkillLevel );
void SetSelected ( const bool bState ) { bIsSelected = bState; }
QFrame* pFrame; QFrame* pFrame;
@ -110,14 +109,12 @@ protected:
bool bOtherChannelIsSolo; bool bOtherChannelIsSolo;
bool bIsMyOwnFader; bool bIsMyOwnFader;
bool bIsSelected;
int iPreviousFaderLevel; int iPreviousFaderLevel;
public slots: public slots:
void OnLevelValueChanged ( int value ) { SendFaderLevelToServer ( value ); } void OnLevelValueChanged ( int value ) { SendFaderLevelToServer ( value ); }
void OnPanValueChanged ( int value ) { SendPanValueToServer ( value ); } void OnPanValueChanged ( int value ) { SendPanValueToServer ( value ); }
void OnMuteStateChanged ( int value ); void OnMuteStateChanged ( int value );
void OnSelectStateChanged ( int value );
signals: signals:
void gainValueChanged ( double value, bool bIsMyOwnFader, int iDiffLevel ); void gainValueChanged ( double value, bool bIsMyOwnFader, int iDiffLevel );