[Libreoffice-commits] core.git: include/sfx2 sfx2/source
Maxim Monastirsky
momonasmon at gmail.com
Wed May 14 12:33:02 PDT 2014
include/sfx2/recentdocsview.hxx | 3 +++
sfx2/source/control/recentdocsview.cxx | 10 +++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
New commits:
commit f22d651487382c64d0e6ce5ce3720eaccaf1150f
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Wed May 14 22:28:40 2014 +0300
startcenter: another attempt to fix mouse up issues
see commits
1a2a961c1e7cdef648c28e211433e8de6e8a831b
4a902e0c59b0dd01e6459c226268bdee4f15489a
Change-Id: I94b90dfc5db779317d4dda1171aeceeac6373548
diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index c1ba062..00e339b 100644
--- a/include/sfx2/recentdocsview.hxx
+++ b/include/sfx2/recentdocsview.hxx
@@ -40,6 +40,9 @@ enum ApplicationType
class SFX2_DLLPUBLIC RecentDocsView : public ThumbnailView
{
+private:
+ size_t mnLastMouseDownItem = THUMBNAILVIEW_ITEM_NOTFOUND;
+
public:
RecentDocsView( Window* pParent );
virtual ~RecentDocsView();
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 0564e8b..0f797f6 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -213,6 +213,8 @@ void RecentDocsView::MouseButtonDown( const MouseEvent& rMEvt )
{
if (rMEvt.IsLeft())
{
+ mnLastMouseDownItem = ImplGetItem(rMEvt.GetPosPixel());
+
// ignore to avoid stuff done in ThumbnailView; we don't do selections etc.
return;
}
@@ -227,11 +229,13 @@ void RecentDocsView::MouseButtonUp(const MouseEvent& rMEvt)
size_t nPos = ImplGetItem(rMEvt.GetPosPixel());
ThumbnailViewItem* pItem = ImplGetItem(nPos);
- if (pItem)
- {
+ if (pItem && nPos == mnLastMouseDownItem)
pItem->MouseButtonUp(rMEvt);
+
+ mnLastMouseDownItem = THUMBNAILVIEW_ITEM_NOTFOUND;
+
+ if (pItem)
return;
- }
}
ThumbnailView::MouseButtonUp(rMEvt);
}
More information about the Libreoffice-commits
mailing list