summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorLennard <Wasserthal@nefkom.net>2012-10-27 18:59:14 +0200
committerThorsten Behrens <tbehrens@suse.com>2012-11-06 13:50:20 +0000
commit85ea03ae536831649b104694d08dced4d4c8663f (patch)
tree6be24bca1d78cfe864c0e1245798205f2e6bb6c9 /sd
parent6f79b2e35be0778bfec3e1854483f2e9a68f68f3 (diff)
fdo#55430 allow clicking objects in front of selected ones
Prevents that selected objects shadow selecting others in front of them. Change-Id: Iee4abf4eddf79ef7ed331221b0a0b23d3370ae2b Signed-off-by: Lennard <Wasserthal@nefkom.net> Reviewed-on: https://gerrit.libreoffice.org/927 Reviewed-by: Thorsten Behrens <tbehrens@suse.com> Tested-by: Thorsten Behrens <tbehrens@suse.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fusel.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index a421cb86afae..2a009430d4fc 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -642,6 +642,8 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
// (and deselect others) as a preparation for showing the context
// menu.
const bool bSelectionOnly = rMEvt.IsRight();
+ SdrObject* pObj;
+ SdrPageView* pPV;
if (bHideAndAnimate)
{
@@ -693,6 +695,17 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
Abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
{
+ /*************************************************************
+ * If a user wants to click on an object in front of a masked
+ * one, he releases the mouse button immediately
+ **************************************************************/
+ if (mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_BEFOREMARK))
+ {
+ //not Needed in the ordinary pick routine for some reason...
+ mpView->UnmarkAllObj();
+ mpView->MarkObj(pObj,pPV,false,false);
+ return (bReturn);
+ }
/**************************************************************
* Toggle between selection and rotation
**************************************************************/