From 9378be4825e63a3eed740403281246de26e7006d Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Tue, 10 Nov 2020 08:01:29 +0100 Subject: Small code clean-up DrawItem already checks if isVisible(), so there is no need to check it twice. Change-Id: I19f739805f06ef495a8e6f6d4d1f75daa889429f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105509 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sfx2/source/control/thumbnailview.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 82a6670e3e4a..ad813a172432 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -719,8 +719,7 @@ bool ThumbnailView::KeyInput( const KeyEvent& rKEvt ) pCurItem->setSelection(!pCurItem->isSelected()); - if (pCurItem->isVisible()) - DrawItem(pCurItem); + DrawItem(pCurItem); maItemStateHdl.Call(pCurItem); } @@ -834,8 +833,7 @@ bool ThumbnailView::MouseButtonDown( const MouseEvent& rMEvt ) { pCurItem->setSelection(false); - if (pCurItem->isVisible()) - DrawItem(pCurItem); + DrawItem(pCurItem); maItemStateHdl.Call(pCurItem); } @@ -857,8 +855,7 @@ bool ThumbnailView::MouseButtonDown( const MouseEvent& rMEvt ) { pCurItem->setSelection(true); - if (pCurItem->isVisible()) - DrawItem(pCurItem); + DrawItem(pCurItem); maItemStateHdl.Call(pCurItem); } -- cgit