From f9a281a794cf98df7fb634cc1c40a3b739b6d8dc Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Wed, 3 Sep 2025 19:02:26 +0100 Subject: [PATCH] Fix: Wrong row may be selected in music playlists. (#14581) Include frame offset when clicking on music playlist to ensure the correct row is selected. --- src/music_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/music_gui.cpp b/src/music_gui.cpp index 22c0a09d0e..80229e5c37 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -582,13 +582,13 @@ struct MusicTrackSelectionWindow : public Window { { switch (widget) { case WID_MTS_LIST_LEFT: { // add to playlist - int y = this->GetRowFromWidget(pt.y, widget, 0, GetCharacterHeight(FS_SMALL)); + int y = this->GetRowFromWidget(pt.y, widget, WidgetDimensions::scaled.framerect.top, GetCharacterHeight(FS_SMALL)); _music.PlaylistAdd(y); break; } case WID_MTS_LIST_RIGHT: { // remove from playlist - int y = this->GetRowFromWidget(pt.y, widget, 0, GetCharacterHeight(FS_SMALL)); + int y = this->GetRowFromWidget(pt.y, widget, WidgetDimensions::scaled.framerect.top, GetCharacterHeight(FS_SMALL)); _music.PlaylistRemove(y); break; }