ramwatch: fix the multiple selection glitch of watch up/down
This commit is contained in:
parent
e89f37f38d
commit
6a35a42883
|
@ -1077,6 +1077,7 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
memcpy(&(rswatches[watchIndex]),&(rswatches[watchIndex - 1]),sizeof(AddressWatcher));
|
||||
memcpy(&(rswatches[watchIndex - 1]),tmp,sizeof(AddressWatcher));
|
||||
free(tmp);
|
||||
ListView_SetItemState(GetDlgItem(hDlg,IDC_WATCHLIST),watchIndex,0,LVIS_FOCUSED|LVIS_SELECTED);
|
||||
ListView_SetSelectionMark(GetDlgItem(hDlg,IDC_WATCHLIST),watchIndex-1);
|
||||
ListView_SetItemState(GetDlgItem(hDlg,IDC_WATCHLIST),watchIndex-1,LVIS_FOCUSED|LVIS_SELECTED,LVIS_FOCUSED|LVIS_SELECTED);
|
||||
ListView_SetItemCount(GetDlgItem(hDlg,IDC_WATCHLIST),WatchCount);
|
||||
|
@ -1093,6 +1094,7 @@ LRESULT CALLBACK RamWatchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
memcpy(&(rswatches[watchIndex]),&(rswatches[watchIndex + 1]),sizeof(AddressWatcher));
|
||||
memcpy(&(rswatches[watchIndex + 1]),tmp,sizeof(AddressWatcher));
|
||||
free(tmp);
|
||||
ListView_SetItemState(GetDlgItem(hDlg,IDC_WATCHLIST),watchIndex,0,LVIS_FOCUSED|LVIS_SELECTED);
|
||||
ListView_SetSelectionMark(GetDlgItem(hDlg,IDC_WATCHLIST),watchIndex+1);
|
||||
ListView_SetItemState(GetDlgItem(hDlg,IDC_WATCHLIST),watchIndex+1,LVIS_FOCUSED|LVIS_SELECTED,LVIS_FOCUSED|LVIS_SELECTED);
|
||||
ListView_SetItemCount(GetDlgItem(hDlg,IDC_WATCHLIST),WatchCount);
|
||||
|
|
Loading…
Reference in New Issue