summaryrefslogtreecommitdiff
path: root/sw/source/ui/docvw/edtwin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/docvw/edtwin.cxx')
-rw-r--r--sw/source/ui/docvw/edtwin.cxx19
1 files changed, 11 insertions, 8 deletions
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 7e978d055bd8..792798777b04 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -2776,8 +2776,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
{
SwWrtShell &rSh = m_rView.GetWrtShell();
- SdrObject* pObj;
- SdrPageView* pPV;
// We have to check if a context menu is shown and we have an UI
// active inplace client. In that case we have to ignore the mouse
// button down event. Otherwise we would crash (context menu has been
@@ -3091,12 +3089,6 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// only if no position to size was hit.
if (!bHitHandle)
{
- 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();
@@ -4194,6 +4186,8 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
*/
void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
{
+ SdrObject* pObj;
+ SdrPageView* pPV;
bool bCallBase = true;
sal_Bool bCallShadowCrsr = m_bWasShdwCrsr;
@@ -4245,6 +4239,15 @@ 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
+ {
+ if (pSdrView->PickObj(aDocPos, pSdrView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER ))
+ {
+ pSdrView->UnmarkAllObj();
+ pSdrView->MarkObj(pObj,pPV,false,false);
+ }
+ }
ReleaseMouse();
return;
}