Fix shortcut conflict detection error in shortcut mapper
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5374#issuecomment-891879420 Fix #5374
This commit is contained in:
parent
a7ede53c26
commit
14a104ad46
|
@ -552,7 +552,10 @@ INT_PTR CALLBACK ShortcutMapper::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
|||
|
||||
generic_string conflictInfo;
|
||||
|
||||
const bool isConflict = findKeyConflicts(&conflictInfo, *reinterpret_cast<KeyCombo*>(wParam), _babygrid.getSelectedRow() - 1);
|
||||
// In case of using filter will make the filtered items change index, so here we get its real index
|
||||
size_t realIndexOfSelectedItem = _shortcutIndex[_babygrid.getSelectedRow() - 1];
|
||||
|
||||
const bool isConflict = findKeyConflicts(&conflictInfo, *reinterpret_cast<KeyCombo*>(wParam), realIndexOfSelectedItem);
|
||||
*reinterpret_cast<bool*>(lParam) = isConflict;
|
||||
|
||||
if (isConflict)
|
||||
|
|
Loading…
Reference in New Issue