aboutsummaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-31 11:15:55 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-31 11:15:55 +0200
commitd9bafcecfd60f38f98bca8a1705f6007b39e18a2 (patch)
tree5a396d0a52251d7ee7e2cb591d15dbda8a54c52c /c
parent58d30975f0d46dc7812b7266c3c2c823695503e5 (diff)
downloadEpisodeBrowser-d9bafcecfd60f38f98bca8a1705f6007b39e18a2.tar.gz
Improve initial scroll position.
(When the focused episode is near the end of the list.)
Diffstat (limited to 'c')
-rw-r--r--c/episodelistview.cpp6
1 files 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()