Don't let global key handler usurp the ModemProperties

This commit is contained in:
Charles J. Cliffe 2016-05-19 19:23:56 -04:00
parent a1c7d0b5f8
commit 27ce295918
2 changed files with 7 additions and 1 deletions

View File

@ -1828,6 +1828,9 @@ int AppFrame::OnGlobalKeyDown(wxKeyEvent &event) {
if (!this->IsActive()) {
return -1;
}
if (modemProps && (modemProps->HasFocus() || modemProps->isMouseInView())) {
return -1;
}
DemodulatorInstance *demod = nullptr, *lastDemod = wxGetApp().getDemodMgr().getLastActiveDemodulator();
int snap = wxGetApp().getFrequencySnap();
@ -1920,6 +1923,9 @@ int AppFrame::OnGlobalKeyUp(wxKeyEvent &event) {
if (!this->IsActive()) {
return -1;
}
if (modemProps && (modemProps->HasFocus() || modemProps->isMouseInView())) {
return -1;
}
DemodulatorInstance *lastDemod = wxGetApp().getDemodMgr().getLastActiveDemodulator();

View File

@ -175,5 +175,5 @@ void ModemProperties::OnMouseLeave(wxMouseEvent & /* event */) {
}
bool ModemProperties::isMouseInView() {
return mouseInView;
return mouseInView || (m_propertyGrid && m_propertyGrid->IsEditorFocused());
}