]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Removing the last track, select the new last track
authorterencehill <piuntn@gmail.com>
Sun, 4 Aug 2013 11:55:55 +0000 (13:55 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 4 Aug 2013 11:55:55 +0000 (13:55 +0200)
qcsrc/menu/xonotic/playlist.c

index c1545b18e9dffa83b8fb9c0fc615c12ed9767666..0c39491859e8cd20d4990a2f4ebbd5e5a8e3b79d 100644 (file)
@@ -97,6 +97,8 @@ void XonoticPlayList_removeFromPlayList(entity me, string track)
        {
                if(argv(i) == track)
                {
+                       if(i == me.nItems - 1)
+                               me.setSelected(me, me.selectedItem - 1);
                        if(cvar("music_playlist_index") == 0 || cvar("music_playlist_index") == 999)
                        {
                                if(cvar("music_playlist_current0") == i)