diff --git a/ChangeLog b/ChangeLog index 3bde676a..7ee4c8d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,8 @@ - avoid showing IP address if no name in the musician profile is given (#316) +- show channel numbers if --ctrlmidich is used (#241, #95) + - bug fix: on MacOS declare an activity to ensure the process doesn't get throttled by OS level Nap, Sleep, and Thread Priority systems, coded by AronVietti (#23) @@ -23,7 +25,6 @@ - 3.5.5 (2020-05-26) - added banjo/mandolin instrument icons created by atsampson (#283) diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 2fbefba7..159e5ab1 100755 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -29,6 +29,7 @@ CClientDlg::CClientDlg ( CClient* pNCliP, CSettings* pNSetP, const QString& strConnOnStartupAddress, + const int iCtrlMIDIChannel, const bool bNewShowComplRegConnList, const bool bShowAnalyzerConsole, QWidget* parent, @@ -37,6 +38,7 @@ CClientDlg::CClientDlg ( CClient* pNCliP, pClient ( pNCliP ), pSettings ( pNSetP ), bConnectDlgWasShown ( false ), + bMIDICtrlUsed ( iCtrlMIDIChannel != INVALID_MIDI_CH ), ClientSettingsDlg ( pNCliP, parent, Qt::Window ), ChatDlg ( parent, Qt::Window ), ConnectDlg ( pNCliP, bNewShowComplRegConnList, parent, Qt::Dialog ), @@ -812,6 +814,15 @@ void CClientDlg::OnLicenceRequired ( ELicenceType eLicenceType ) void CClientDlg::OnConClientListMesReceived ( CVector vecChanInfo ) { + // show channel numbers if --ctrlmidich is used (#241, #95) + if ( bMIDICtrlUsed ) + { + for ( int i = 0; i < vecChanInfo.Size(); i++ ) + { + vecChanInfo[i].strName.prepend ( QString().setNum ( vecChanInfo[i].iChanID ) + ":" ); + } + } + // update mixer board with the additional client infos MainMixerBoard->ApplyNewConClientList ( vecChanInfo ); } diff --git a/src/clientdlg.h b/src/clientdlg.h index a54d22f5..0040db8a 100755 --- a/src/clientdlg.h +++ b/src/clientdlg.h @@ -72,6 +72,7 @@ public: CClientDlg ( CClient* pNCliP, CSettings* pNSetP, const QString& strConnOnStartupAddress, + const int iCtrlMIDIChannel, const bool bNewShowComplRegConnList, const bool bShowAnalyzerConsole, QWidget* parent = nullptr, @@ -96,6 +97,7 @@ protected: bool bConnected; bool bConnectDlgWasShown; + bool bMIDICtrlUsed; QTimer TimerSigMet; QTimer TimerBuffersLED; QTimer TimerStatus; diff --git a/src/main.cpp b/src/main.cpp index 62d90d02..0fdaa607 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -608,6 +608,7 @@ int main ( int argc, char** argv ) CClientDlg ClientDlg ( &Client, &Settings, strConnOnStartupAddress, + iCtrlMIDIChannel, bShowComplRegConnList, bShowAnalyzerConsole, nullptr,