From d9bafcecfd60f38f98bca8a1705f6007b39e18a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sun, 31 Jul 2022 11:15:55 +0200 Subject: Improve initial scroll position. (When the focused episode is near the end of the list.) --- c/episodelistview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp index 0c8c60d..ffd8879 100644 --- a/c/episodelistview.cpp +++ b/c/episodelistview.cpp @@ -166,12 +166,12 @@ void EpisodeListView::RestoreFocus() if (iItem != -1) goto s; return; -s: ListView_SetItemState(hWnd, -1, LVIF_STATE, LVIS_SELECTED); +s: UpdateItem(iItem, iEpisode); + g_pDlv->ShowEpisode(iEpisode); + ListView_SetItemState(hWnd, -1, LVIF_STATE, LVIS_SELECTED); SetTop(iItem > 5? iItem-5: 0); ListView_SetItemState(hWnd, iItem, LVIS_SELECTED|LVIS_FOCUSED, LVIS_SELECTED|LVIS_FOCUSED); - UpdateItem(iItem, iEpisode); - g_pDlv->ShowEpisode(iEpisode); } void EpisodeListView::SaveFocus() -- cgit v1.2.3