[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - sfx2/source
Cédric Bosdonnat
cedric.bosdonnat at free.fr
Tue Mar 26 01:46:09 PDT 2013
sfx2/source/control/thumbnailview.cxx | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
New commits:
commit edc8b07e5f69413b3710ddf192a84a862b0e17af
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date: Mon Mar 25 17:58:49 2013 +0100
fdo#62659: only select items in ThumbnailView on TabStop
Change-Id: I024df8520f0daf2cc2e9e5f041e1ff18cb3689ec
(cherry picked from commit f8a3582d4cbcf6a705f724b921e370c739ecee35)
Reviewed-on: https://gerrit.libreoffice.org/3034
Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
Tested-by: Miklos Vajna <vmiklos at suse.cz>
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index 08be7cb..0da633f 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 )
@@ -680,17 +681,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.
More information about the Libreoffice-commits
mailing list