macosx/vlc_app/VLCMediaListLayer: Correctly go to the right layer.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 16 Feb 2008 00:52:43 +0000 (00:52 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 16 Feb 2008 00:52:43 +0000 (00:52 +0000)
projects/macosx/vlc_app/Sources/VLCMediaListLayer.m

index b5f0139..c0506fa 100644 (file)
         /* It is ok to scroll five layers */
         if( selectedIndex - index < 5  )
         {
-            [self changeSelectedLayerToPreviousIndex];
+            while( index < selectedIndex  )
+                [self changeSelectedLayerToPreviousIndex];
             return;
         }
         [self changeSelectedLayerToPreviousIndex];
     {
         if( index - selectedIndex < 5  )
         {
-            [self changeSelectedLayerToNextIndex];
+            while( index > selectedIndex  )
+                [self changeSelectedLayerToNextIndex];
             return;
         }
         [self changeSelectedLayerToNextIndex];