Do not reset the selection after changing hotkey
This commit is contained in:
parent
06add0d130
commit
b2a5307e4b
|
@ -235,18 +235,11 @@ void WIDGET_HOTKEY_LIST::EditItem( wxTreeListItem aItem )
|
||||||
wxString current_key = GetItemText( aItem, 1 );
|
wxString current_key = GetItemText( aItem, 1 );
|
||||||
|
|
||||||
wxKeyEvent key_event = HK_PROMPT_DIALOG::PromptForKey( GetParent(), name, current_key );
|
wxKeyEvent key_event = HK_PROMPT_DIALOG::PromptForKey( GetParent(), name, current_key );
|
||||||
|
|
||||||
if( hkdata )
|
|
||||||
{
|
|
||||||
long key = MapKeypressToKeycode( key_event );
|
long key = MapKeypressToKeycode( key_event );
|
||||||
|
|
||||||
if( key == 0 )
|
if( hkdata && key )
|
||||||
{
|
|
||||||
// key: Escape
|
|
||||||
UnselectAll();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
|
|
||||||
// See if this key code is handled in hotkeys names list
|
// See if this key code is handled in hotkeys names list
|
||||||
bool exists;
|
bool exists;
|
||||||
KeyNameFromKeyCode( key, &exists );
|
KeyNameFromKeyCode( key, &exists );
|
||||||
|
@ -260,14 +253,11 @@ void WIDGET_HOTKEY_LIST::EditItem( wxTreeListItem aItem )
|
||||||
{
|
{
|
||||||
hkdata->GetHotkey().m_KeyCode = key;
|
hkdata->GetHotkey().m_KeyCode = key;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Remove selection
|
|
||||||
UnselectAll();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
UpdateFromClientData();
|
UpdateFromClientData();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void WIDGET_HOTKEY_LIST::ResetItem( wxTreeListItem aItem )
|
void WIDGET_HOTKEY_LIST::ResetItem( wxTreeListItem aItem )
|
||||||
|
|
Loading…
Reference in New Issue