Kaydet (Commit) a5156a41 authored tarafından Rodolfo Ribeiro Gomes's avatar Rodolfo Ribeiro Gomes Kaydeden (comit) Jan Holesovsky

ThumbnailView: item found by mouse pos is always visible

-- so it does not need to check it again

Change-Id: Id6fc2732bde8dd7f6011828b6bc29d7947bf6312
Signed-off-by: 's avatarRodolfo Ribeiro Gomes <rodolforg@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/6629Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
Tested-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst a7d0400d
......@@ -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 );
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment