sfx2/source/control/thumbnailview.cxx |   19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

New commits:
commit 5d19f429ab81aa236543d6a11a193de8c2cc5c59
Author: Rafael Dominguez <venccsra...@gmail.com>
Date:   Fri Apr 12 20:28:55 2013 -0430

    Down-arrow jump to last item when there is no item immediately below.
    
    Change-Id: I23f5f002826e2ecc25ff19d18372cb637feb1310

diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index f2643a6..96dc91a 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -564,10 +564,23 @@ void ThumbnailView::KeyInput( const KeyEvent& rKEvt )
             break;
         case KEY_DOWN:
             {
-                if ( bFoundLast && nLastPos < mFilteredItemList.size( ) - 
mnCols )
+                if ( bFoundLast )
                 {
-                    bValidRange = true;
-                    nNextPos = nLastPos + mnCols;
+                    //If we are in the second last row just go the one in
+                    //the row below, if theres not row below just go to the
+                    //last item but for the last row dont do anything.
+                    if ( nLastPos < mFilteredItemList.size( ) - mnCols )
+                    {
+                        bValidRange = true;
+                        nNextPos = nLastPos + mnCols;
+                    }
+                    else
+                    {
+                        int curRow = nLastPos/mnCols;
+
+                        if (curRow < mnLines-1)
+                            nNextPos = mFilteredItemList.size()-1;
+                    }
                 }
 
                 pNext = mFilteredItemList[nNextPos];
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to