Make sure VK popup menu doesn't go off the screen.

ms-voice-keyer-improvements
Mooneer Salem 2023-08-05 11:49:30 -07:00
parent 8af6c9685b
commit 98c43d8388
1 changed files with 2 additions and 1 deletions

View File

@ -109,7 +109,8 @@ void MainFrame::OnTogBtnVoiceKeyerRightClick( wxContextMenuEvent& event )
// Only handle right-click if idle
if (vk_state == VK_IDLE && !m_btnTogPTT->GetValue())
{
m_togBtnVoiceKeyer->PopupMenu(voiceKeyerPopupMenu_);
auto sz = m_togBtnVoiceKeyer->GetSize();
m_togBtnVoiceKeyer->PopupMenu(voiceKeyerPopupMenu_, wxPoint(-sz.GetWidth(), 0));
}
}