From a8f711dfad63c5b1949439ac33ab4a162ab90ded Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Mon, 18 Aug 2014 02:58:30 -0400 Subject: Implemented Table.Selected()/Select() on GTK+, more TODOs, and a quick Windows fix. --- redo/table_windows.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'redo/table_windows.c') diff --git a/redo/table_windows.c b/redo/table_windows.c index a34e47a..6f0faae 100644 --- a/redo/table_windows.c +++ b/redo/table_windows.c @@ -145,6 +145,8 @@ void tableSelectItem(HWND hwnd, intptr_t index) if (SendMessageW(hwnd, LVM_SETITEMSTATE, (WPARAM) current, (LPARAM) (&item)) == FALSE) xpanic("error deselecting current Table item", GetLastError()); } + if (index == -1) // select nothing + return; ZeroMemory(&item, sizeof (LVITEMW)); item.mask = LVIF_STATE; item.state = LVIS_FOCUSED | LVIS_SELECTED; -- cgit v1.2.3