Skip to content

Commit 4819f04

Browse files
authored
Merge pull request #669 from drowe67/ms-ptt-spacebar-color
Fix bug where PTT button background color doesn't change when toggling PTT via space bar.
2 parents d9c5b6b + ce53cea commit 4819f04

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

USER_MANUAL.md

+1
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
896896
* Better handle high sample rate audio devices and those with >2 channels. (PR #668)
897897
* Fix issue preventing errors from being displayed for issues involving the FreeDV->Speaker sound device. (PR #668)
898898
* Fix issue resulting in incorrect audio device usage after validation failure if no valid default exists. (PR #668)
899+
* Fix bug where PTT button background color doesn't change when toggling PTT via space bar. (PR #669)
899900
2. Enhancements:
900901
* Add Frequency column to RX drop-down. (PR #663)
901902
* Update tooltip for the free form text field to indicate that it's not covered by FEC. (PR #665)

src/ongui.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -794,13 +794,18 @@ int MainApp::FilterEvent(wxEvent& event)
794794
if (frame->m_RxRunning && (mainWindowActive || reporterActiveButNotUpdatingTextMessage) &&
795795
wxGetApp().appConfiguration.enableSpaceBarForPTT && !frame->isReceiveOnly()) {
796796

797-
// space bar controls rx/rx if keyer not running
797+
// space bar controls tx/rx if keyer not running
798798
if (frame->vk_state == VK_IDLE) {
799799
if (frame->m_btnTogPTT->GetValue())
800800
frame->m_btnTogPTT->SetValue(false);
801801
else
802802
frame->m_btnTogPTT->SetValue(true);
803803

804+
// Update background color of button here because when toggling PTT via keyboard,
805+
// the background color for some reason doesn't update inside togglePTT().
806+
frame->m_btnTogPTT->SetBackgroundColour(frame->m_btnTogPTT->GetValue() ? *wxRED : wxNullColour);
807+
808+
// Actually toggle PTT.
804809
frame->togglePTT();
805810
}
806811
else // space bar stops keyer

0 commit comments

Comments
 (0)