mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-22 13:24:42 +02:00
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;
|
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;
|
*reinterpret_cast<bool*>(lParam) = isConflict;
|
||||||
|
|
||||||
if (isConflict)
|
if (isConflict)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user