summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-03-25 17:58:49 +0100
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-03-25 18:18:22 +0100
commitf8a3582d4cbcf6a705f724b921e370c739ecee35 (patch)
tree78455d45c19d938ae8f24b0557bf6edf0c389c1d
parentcc599e914e7ade9f10da460fc1c77ea07454d7ff (diff)
fdo#62659: only select items in ThumbnailView on TabStop
Change-Id: I024df8520f0daf2cc2e9e5f041e1ff18cb3689ec
-rw-r--r--sfx2/source/control/thumbnailview.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 400b5ab97b81..49ca69941d06 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -126,6 +126,7 @@ void ThumbnailView::ImplDeleteItems()
}
mItemList.clear();
+ mFilteredItemList.clear();
}
void ThumbnailView::ImplInitSettings( bool bFont, bool bForeground, bool bBackground )
@@ -677,17 +678,20 @@ void ThumbnailView::Paint( const Rectangle &aRect)
void ThumbnailView::GetFocus()
{
- // Select the first item if nothing selected
- int nSelected = -1;
- for (size_t i = 0, n = mItemList.size(); i < n && nSelected == -1; ++i)
+ if(GETFOCUS_TAB & GetGetFocusFlags())
{
- if (mItemList[i]->isSelected())
- nSelected = i;
- }
+ // Select the first item if nothing selected
+ int nSelected = -1;
+ for (size_t i = 0, n = mItemList.size(); i < n && nSelected == -1; ++i)
+ {
+ if (mItemList[i]->isSelected())
+ nSelected = i;
+ }
- if ( nSelected == -1 && mItemList.size( ) > 0 )
- {
- SelectItem( 1 );
+ if ( nSelected == -1 && mItemList.size( ) > 0 )
+ {
+ SelectItem( 1 );
+ }
}
// Tell the accessible object that we got the focus.