Fixed the save state hotkeys so that they work with the Render to Main Window option.

This commit is contained in:
skidau 2015-02-04 23:23:52 +11:00
parent 7216e94823
commit cc6b55ee2a
1 changed files with 11 additions and 14 deletions

View File

@ -1398,25 +1398,22 @@ void CFrame::ParseHotkeys(wxKeyEvent &event)
}
unsigned int i = NUM_HOTKEYS;
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain || TASInputHasFocus())
for (i = 0; i < NUM_HOTKEYS; i++)
{
for (i = 0; i < NUM_HOTKEYS; i++)
if (IsHotkey(event, i))
{
if (IsHotkey(event, i))
int cmd = GetCmdForHotkey(i);
if (cmd >= 0)
{
int cmd = GetCmdForHotkey(i);
if (cmd >= 0)
wxCommandEvent evt(wxEVT_MENU, cmd);
wxMenuItem *item = GetMenuBar()->FindItem(cmd);
if (item && item->IsCheckable())
{
wxCommandEvent evt(wxEVT_MENU, cmd);
wxMenuItem *item = GetMenuBar()->FindItem(cmd);
if (item && item->IsCheckable())
{
item->wxMenuItemBase::Toggle();
evt.SetInt(item->IsChecked());
}
GetEventHandler()->AddPendingEvent(evt);
break;
item->wxMenuItemBase::Toggle();
evt.SetInt(item->IsChecked());
}
GetEventHandler()->AddPendingEvent(evt);
break;
}
}
}