diff options
Diffstat (limited to 'src/music_gui.cpp')
-rw-r--r-- | src/music_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/music_gui.cpp b/src/music_gui.cpp index c141f4e1f..380ba09ce 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -401,7 +401,7 @@ struct MusicTrackSelectionWindow : public Window { { switch (widget) { case MTSW_LIST_LEFT: { // add to playlist - int y = (pt.y - this->GetWidget<NWidgetBase>(widget)->pos_y) / FONT_HEIGHT_SMALL; + int y = this->GetRowFromWidget(pt.y, widget, 0, FONT_HEIGHT_SMALL); if (msf.playlist < 4) return; if (!IsInsideMM(y, 0, BaseMusic::GetUsedSet()->num_available)) return; @@ -425,7 +425,7 @@ struct MusicTrackSelectionWindow : public Window { } break; case MTSW_LIST_RIGHT: { // remove from playlist - int y = (pt.y - this->GetWidget<NWidgetBase>(widget)->pos_y) / FONT_HEIGHT_SMALL; + int y = this->GetRowFromWidget(pt.y, widget, 0, FONT_HEIGHT_SMALL); if (msf.playlist < 4) return; if (!IsInsideMM(y, 0, NUM_SONGS_PLAYLIST)) return; |