diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2013-04-12 20:28:55 -0430 |
---|---|---|
committer | Rafael Dominguez <venccsralph@gmail.com> | 2013-04-25 10:38:07 -0430 |
commit | 5d19f429ab81aa236543d6a11a193de8c2cc5c59 (patch) | |
tree | caf8d89fb95bc996f593105b9795b6929b86a1c4 /sfx2 | |
parent | 53f7f39818e22ca1bf049c2e3fea845ac49e5bfc (diff) |
Down-arrow jump to last item when there is no item immediately below.
Change-Id: I23f5f002826e2ecc25ff19d18372cb637feb1310
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 19 |
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]; |