[Libreoffice-commits] core.git: sfx2/source

Christophe JAILLET (via logerrit) logerrit at kemper.freedesktop.org
Tue Nov 10 08:27:17 UTC 2020


 sfx2/source/control/thumbnailview.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 9378be4825e63a3eed740403281246de26e7006d
Author:     Christophe JAILLET <christophe.jaillet at wanadoo.fr>
AuthorDate: Tue Nov 10 08:01:29 2020 +0100
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Nov 10 09:26:39 2020 +0100

    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 at collabora.co.uk>

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);
                     }


More information about the Libreoffice-commits mailing list