From: Pierre d'Herbemont Date: Sat, 16 Feb 2008 00:52:43 +0000 (+0000) Subject: macosx/vlc_app/VLCMediaListLayer: Correctly go to the right layer. X-Git-Tag: 0.9.0-test0~2637 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=bbc02c3f6afaf65660315ec17a322339bf333102;p=vlc macosx/vlc_app/VLCMediaListLayer: Correctly go to the right layer. --- diff --git a/projects/macosx/vlc_app/Sources/VLCMediaListLayer.m b/projects/macosx/vlc_app/Sources/VLCMediaListLayer.m index b5f013949f..c0506fa082 100644 --- a/projects/macosx/vlc_app/Sources/VLCMediaListLayer.m +++ b/projects/macosx/vlc_app/Sources/VLCMediaListLayer.m @@ -215,7 +215,8 @@ /* It is ok to scroll five layers */ if( selectedIndex - index < 5 ) { - [self changeSelectedLayerToPreviousIndex]; + while( index < selectedIndex ) + [self changeSelectedLayerToPreviousIndex]; return; } [self changeSelectedLayerToPreviousIndex]; @@ -227,7 +228,8 @@ { if( index - selectedIndex < 5 ) { - [self changeSelectedLayerToNextIndex]; + while( index > selectedIndex ) + [self changeSelectedLayerToNextIndex]; return; } [self changeSelectedLayerToNextIndex];