diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2020-11-10 08:01:29 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-10 09:26:39 +0100 |
commit | 9378be4825e63a3eed740403281246de26e7006d (patch) | |
tree | 5c7fb4b26a0e81f63f0f891a44a6f1c3fadae7a5 | |
parent | abfee0d2517195dfe49be8d538a48b31f4fb0eef (diff) |
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 <noel.grandin@collabora.co.uk>
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
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); } |