[Libreoffice-commits] core.git: sfx2/source
Rafael Dominguez
venccsralph at gmail.com
Thu Apr 25 08:09:12 PDT 2013
sfx2/source/control/thumbnailview.cxx | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
New commits:
commit 5d19f429ab81aa236543d6a11a193de8c2cc5c59
Author: Rafael Dominguez <venccsralph at 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];
More information about the Libreoffice-commits
mailing list