libsaria: Go to new current iterator when picking next

The new "cur" iterator points to a valid song, so I might as well scroll
close to it.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
Bryan Schumaker 2012-04-13 08:06:36 -04:00
parent 0cdd5eff0d
commit 570374f53d
1 changed files with 4 additions and 2 deletions

View File

@ -31,8 +31,10 @@ namespace libsaria
remove_track_it(cur, index);
schedule_save();
if (cur == plist.end())
cur = plist.begin();
if (index != 0)
index--;
if (get_size() != 0)
RENDER(goto_index(index));
return res;
}