Add 'p' key as peak-hold toggle

This commit is contained in:
Charles J. Cliffe 2016-06-09 18:16:03 -04:00
parent 13be18a2a3
commit 654aae2383

View File

@ -1898,6 +1898,7 @@ int AppFrame::OnGlobalKeyDown(wxKeyEvent &event) {
case 'L':
case 'U':
case 'S':
case 'P':
return 1;
case '0':
case '1':
@ -2013,6 +2014,12 @@ int AppFrame::OnGlobalKeyUp(wxKeyEvent &event) {
wxGetApp().setSoloMode(!wxGetApp().getSoloMode());
return 1;
break;
case 'P':
wxGetApp().getSpectrumProcessor()->setPeakHold(!wxGetApp().getSpectrumProcessor()->getPeakHold());
wxGetApp().getDemodSpectrumProcessor()->setPeakHold(wxGetApp().getSpectrumProcessor()->getPeakHold());
peakHoldButton->setSelection(wxGetApp().getSpectrumProcessor()->getPeakHold()?1:0);
peakHoldButton->clearModeChanged();
break;
case ']':
case '[':
return 1;