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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user