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

Rodolfo Ribeiro Gomes rodolforg at gmail.com
Sun Nov 10 15:00:47 PST 2013


 sfx2/source/control/recentdocsview.cxx |   10 +++-------
 sfx2/source/control/thumbnailview.cxx  |    7 ++-----
 2 files changed, 5 insertions(+), 12 deletions(-)

New commits:
commit a5156a41633701fd0591640ba665fdb10221fe71
Author: Rodolfo Ribeiro Gomes <rodolforg at gmail.com>
Date:   Sun Nov 10 10:46:42 2013 -0200

    ThumbnailView: item found by mouse pos is always visible
    
    -- so it does not need to check it again
    
    Change-Id: Id6fc2732bde8dd7f6011828b6bc29d7947bf6312
    Signed-off-by: Rodolfo Ribeiro Gomes <rodolforg at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/6629
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 888c3ad..14e8f65 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -180,14 +180,10 @@ void RecentDocsView::MouseButtonDown( const MouseEvent& rMEvt )
         size_t nPos = ImplGetItem(rMEvt.GetPosPixel());
         ThumbnailViewItem* pItem = ImplGetItem(nPos);
 
-        if (pItem && pItem->isVisible())
+        if (pItem)
         {
-            Rectangle aRect(pItem->getDrawArea());
-            if (aRect.IsInside(rMEvt.GetPosPixel()))
-            {
-                OnItemDblClicked(pItem);
-                return;
-            }
+            OpenItem(pItem);
+            return;
         }
     }
     ThumbnailView::MouseButtonDown( rMEvt );
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index e3e1b8f..6279174 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -737,7 +737,7 @@ void ThumbnailView::MouseButtonDown( const MouseEvent& rMEvt )
         size_t nPos = ImplGetItem(rMEvt.GetPosPixel());
         ThumbnailViewItem* pItem = ImplGetItem(nPos);
 
-        if (pItem && pItem->isVisible())
+        if (pItem)
         {
             if ( rMEvt.GetClicks() == 1 )
             {
@@ -829,10 +829,7 @@ void ThumbnailView::MouseButtonDown( const MouseEvent& rMEvt )
             }
             else if ( rMEvt.GetClicks() == 2 )
             {
-                Rectangle aRect(pItem->getDrawArea());
-
-                if (aRect.IsInside(rMEvt.GetPosPixel()))
-                    OnItemDblClicked(pItem);
+                OnItemDblClicked(pItem);
             }
 
             return;


More information about the Libreoffice-commits mailing list