File tree Expand file tree Collapse file tree 1 file changed +17
-11
lines changed
Expand file tree Collapse file tree 1 file changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -1063,25 +1063,31 @@ void CClientSettingsDlg::OnSndCrdBufferDelayButtonGroupClicked ( QAbstractButton
10631063 UpdateDisplay ();
10641064}
10651065
1066+ // / @method
1067+ // / @brief Sets upstream rate label to current upload rate if the client is connected, else resets label
10661068void CClientSettingsDlg::UpdateUploadRate ()
10671069{
1068- // update upstream rate information label
1069- lblUpstreamValue->setText ( QString ().setNum ( pClient->GetUploadRateKbps () ) );
1070- lblUpstreamUnit->setText ( " kbps" );
1070+ // update upstream rate information label if needed
1071+ if ( pClient->IsConnected () )
1072+ {
1073+ lblUpstreamValue->setText ( QString ().setNum ( pClient->GetUploadRateKbps () ) );
1074+ lblUpstreamUnit->setText ( " kbps" );
1075+ }
1076+ else
1077+ {
1078+ // clear text labels with client parameters
1079+ lblUpstreamValue->setText ( " ---" );
1080+ lblUpstreamUnit->setText ( " " );
1081+ }
10711082}
10721083
1084+ // / @method
1085+ // / @brief Updates slider controls (settings might have been changed) and upstream rate information label
10731086void CClientSettingsDlg::UpdateDisplay ()
10741087{
1075- // update slider controls (settings might have been changed)
10761088 UpdateJitterBufferFrame ();
10771089 UpdateSoundCardFrame ();
1078-
1079- if ( !pClient->IsRunning () )
1080- {
1081- // clear text labels with client parameters
1082- lblUpstreamValue->setText ( " ---" );
1083- lblUpstreamUnit->setText ( " " );
1084- }
1090+ UpdateUploadRate ();
10851091}
10861092
10871093void CClientSettingsDlg::UpdateDirectoryComboBox ()
You can’t perform that action at this time.
0 commit comments