diff options
author | John Ankarström <john@ankarstrom.se> | 2022-04-18 00:12:06 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-04-18 00:12:06 +0200 |
commit | 16902bf221c9fac58218ca50c479f93a3e01943d (patch) | |
tree | 8c3b66747f16ce78c07ba30c665c16c9d91b5458 /c/main.c | |
parent | 2d83bf905a8da36a03d02ec83847741d553a7289 (diff) | |
download | EpisodeBrowser-16902bf221c9fac58218ca50c479f93a3e01943d.tar.gz |
Ensure focused item is visible after filter update.
Diffstat (limited to 'c/main.c')
-rw-r--r-- | c/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -222,7 +222,9 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) break; case IDM_VIEW_WATCHED: { + int iEpFocus; term_t t; + extern HWND HElv; CheckMenuItem(GetMenu(hWnd), IDM_VIEW_WATCHED, BViewWatched? MF_UNCHECKED: MF_CHECKED); BViewWatched = !BViewWatched; @@ -230,11 +232,16 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) t = T(1); PI(t,BViewWatched) break; P("cfg","set_view_watched",1,t); + iEpFocus = ListView_GetNextItem(HElv, -1, LVNI_FOCUSED); + if (iEpFocus == -1) break; + ListView_EnsureVisible(HElv, iEpFocus, TRUE); break; } case IDM_VIEW_TV_ORIGINAL: { + int iEpFocus; term_t t; + extern HWND HElv; CheckMenuItem(GetMenu(hWnd), IDM_VIEW_TV_ORIGINAL, BViewTVOriginal? MF_UNCHECKED: MF_CHECKED); BViewTVOriginal = !BViewTVOriginal; @@ -242,6 +249,9 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) t = T(1); PI(t,BViewTVOriginal) break; P("cfg","set_view_tv_original",1,t); + iEpFocus = ListView_GetNextItem(HElv, -1, LVNI_FOCUSED); + if (iEpFocus == -1) break; + ListView_EnsureVisible(HElv, iEpFocus, TRUE); break; } case IDM_WATCH: |