diff options
author | Lennard Wasserthal <Wasserthal@nefkom.net> | 2014-04-05 11:55:24 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-04-09 14:40:09 +0200 |
commit | 5b21eea4b737abe9684da937423540963c7265d6 (patch) | |
tree | ff1544fd38270233b7942c6a24d98199d7c7648d | |
parent | b4fd20fc6b4d7635c607fb2022e6694ed8466022 (diff) |
fdo#69157 Apply object-in front selection on mouseUp
Before, all selection was recklessly replaced when you clicked something
else than a scaling handle (or the like).
It caused bug 69157.
But now, you can still drag the frame by gripping the interior one.
Btw, that the timer did not correctly start was because of the return
statement in the prior state.
Signed-off-by: Lennard Wasserthal <Wasserthal@nefkom.net>
Conflicts:
sw/source/core/uibase/docvw/edtwin.cxx
Change-Id: I5e02cfb2d5fe9cdb9fd7f50d0c961dcc418fadd6
-rw-r--r-- | sw/source/core/uibase/docvw/edtwin.cxx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sw/source/core/uibase/docvw/edtwin.cxx b/sw/source/core/uibase/docvw/edtwin.cxx index b133211a3ad6..2534400bfff7 100644 --- a/sw/source/core/uibase/docvw/edtwin.cxx +++ b/sw/source/core/uibase/docvw/edtwin.cxx @@ -3079,14 +3079,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) // only if no position to size was hit. if (!bHitHandle) { - SdrObject* pObj; - SdrPageView* pPV; - if (pSdrView->PickObj(aDocPos, pSdrView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_BEFOREMARK)) - { - pSdrView->UnmarkAllObj(); - pSdrView->MarkObj(pObj,pPV,false,false); - return; - } StartDDTimer(); SwEditWin::m_nDDStartPosY = aDocPos.Y(); SwEditWin::m_nDDStartPosX = aDocPos.X(); @@ -4243,6 +4235,17 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) bFrmDrag = false; } bNoInterrupt = false; + const Point aDocPos( PixelToLogic( rMEvt.GetPosPixel() ) ); + if ((PixelToLogic(m_aStartPos).Y() == (aDocPos.Y())) && (PixelToLogic(m_aStartPos).X() == (aDocPos.X())))//To make sure it was not moved + { + SdrObject* pObj; + SdrPageView* pPV; + if (pSdrView->PickObj(aDocPos, pSdrView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER )) + { + pSdrView->UnmarkAllObj(); + pSdrView->MarkObj(pObj,pPV,false,false); + } + } ReleaseMouse(); return; } |