Skip to content

Commit

Permalink
Merge pull request #669 from drowe67/ms-ptt-spacebar-color
Browse files Browse the repository at this point in the history
Fix bug where PTT button background color doesn't change when toggling PTT via space bar.
  • Loading branch information
tmiw authored Jan 25, 2024
2 parents d9c5b6b + ce53cea commit 4819f04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
* Better handle high sample rate audio devices and those with >2 channels. (PR #668)
* Fix issue preventing errors from being displayed for issues involving the FreeDV->Speaker sound device. (PR #668)
* Fix issue resulting in incorrect audio device usage after validation failure if no valid default exists. (PR #668)
* Fix bug where PTT button background color doesn't change when toggling PTT via space bar. (PR #669)
2. Enhancements:
* Add Frequency column to RX drop-down. (PR #663)
* Update tooltip for the free form text field to indicate that it's not covered by FEC. (PR #665)
Expand Down
7 changes: 6 additions & 1 deletion src/ongui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -794,13 +794,18 @@ int MainApp::FilterEvent(wxEvent& event)
if (frame->m_RxRunning && (mainWindowActive || reporterActiveButNotUpdatingTextMessage) &&
wxGetApp().appConfiguration.enableSpaceBarForPTT && !frame->isReceiveOnly()) {

// space bar controls rx/rx if keyer not running
// space bar controls tx/rx if keyer not running
if (frame->vk_state == VK_IDLE) {
if (frame->m_btnTogPTT->GetValue())
frame->m_btnTogPTT->SetValue(false);
else
frame->m_btnTogPTT->SetValue(true);

// Update background color of button here because when toggling PTT via keyboard,
// the background color for some reason doesn't update inside togglePTT().
frame->m_btnTogPTT->SetBackgroundColour(frame->m_btnTogPTT->GetValue() ? *wxRED : wxNullColour);

// Actually toggle PTT.
frame->togglePTT();
}
else // space bar stops keyer
Expand Down

0 comments on commit 4819f04

Please sign in to comment.