diff options
author | Rodolfo Ribeiro Gomes <rodolforg@gmail.com> | 2013-11-10 10:46:42 -0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2013-11-10 23:00:26 +0000 |
commit | a5156a41633701fd0591640ba665fdb10221fe71 (patch) | |
tree | 0257a9044319df722d4786039e436d7ef3605c31 /sfx2/source | |
parent | a7d0400db274b5c8e41b59241bf0643f8d69e25b (diff) |
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@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/6629
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/control/recentdocsview.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 7 |
2 files changed, 5 insertions, 12 deletions
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx index 888c3add81e6..14e8f655ca72 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 e3e1b8f27326..6279174d9323 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; |