diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-03 15:53:00 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-06 12:53:00 +0200 |
commit | 1417638df98c53c66e5dadf5951d57b4dff6c21f (patch) | |
tree | 6a4b428b545cc01e4e92092249526606f50e26b0 /sd/source/ui | |
parent | d780236582cfcf112b3253a111504c85722cd904 (diff) |
fix deselect of textbox on slides with images in underlying master
The original work of tdf#55430 tries to select an object under
another one on the second click, but these images are unselectable
so this fails. Red Hat has a whole new shiny bunch of templates which
have such images in their masters.
Check if the object is selectable before continuing
Change-Id: I182abaf50e8bb1084c5819dc9e1ffd8b386a9e93
(cherry picked from commit abbe4f9d64073d77c4be93b7c89c03d0651bacef)
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/func/fusel.cxx | 9 | ||||
-rw-r--r-- | sd/source/ui/func/futext.cxx | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 9c965f7622a5..905ee883e26d 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -684,9 +684,12 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) **************************************************************/ if (mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER | SdrSearchOptions::BEFOREMARK)) { - mpView->UnmarkAllObj(); - mpView->MarkObj(pObj,pPV,false,false); - return true; + if (pPV->IsObjSelectable(pObj)) + { + mpView->UnmarkAllObj(); + mpView->MarkObj(pObj,pPV,false,false); + return true; + } } /************************************************************** * Toggle between selection and rotation diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index ac6fb7180214..b848762794ae 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -656,9 +656,12 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt) **************************************************************/ if (mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER | SdrSearchOptions::BEFOREMARK)) { - mpView->UnmarkAllObj(); - mpView->MarkObj(pObj,pPV,false,false); - return bReturn; + if (pPV->IsObjSelectable(pObj)) + { + mpView->UnmarkAllObj(); + mpView->MarkObj(pObj,pPV,false,false); + return bReturn; + } } } } |