centralize the invert decision logic to avoid updates to 7 ports
This will make it easier to tinker for best results.
This commit is contained in:
@@ -1306,7 +1306,8 @@ onListChar(HWND hWnd, HWND hwndList, WORD ch)
|
||||
if (data->how == PICK_ANY) {
|
||||
reset_menu_count(hwndList, data);
|
||||
for (i = 0; i < data->menu.size; i++) {
|
||||
if (!(data->menu.items[i].itemflags & MENU_ITEMFLAGS_SKIPINVERT))
|
||||
if (menuitem_invert_test(0, data->menu.items[i].itemflags,
|
||||
NHMENU_IS_SELECTED(data->menu.items[i])))
|
||||
SelectMenuItem(hwndList, data, i,
|
||||
NHMENU_IS_SELECTED(data->menu.items[i]) ? 0
|
||||
: -1);
|
||||
@@ -1354,7 +1355,8 @@ onListChar(HWND hWnd, HWND hwndList, WORD ch)
|
||||
from = max(0, topIndex);
|
||||
to = min(data->menu.size, from + pageSize);
|
||||
for (i = from; i < to; i++) {
|
||||
if (!(data->menu.items[i].itemflags & MENU_ITEMFLAGS_SKIPINVERT))
|
||||
if (menuitem_invert_test(0, data->menu.items[i].itemflags,
|
||||
NHMENU_IS_SELECTED(data->menu.items[i])))
|
||||
SelectMenuItem(hwndList, data, i,
|
||||
NHMENU_IS_SELECTED(data->menu.items[i]) ? 0
|
||||
: -1);
|
||||
|
||||
Reference in New Issue
Block a user