summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/thumbnailview.cxx19
1 files changed, 16 insertions, 3 deletions
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index f2643a632145..96dc91a2dd60 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];