diff options
Diffstat (limited to 'sw/source/uibase/ribbar/drawbase.cxx')
-rw-r--r-- | sw/source/uibase/ribbar/drawbase.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx index f2b13d8d1372..7d835b54bd1a 100644 --- a/sw/source/uibase/ribbar/drawbase.cxx +++ b/sw/source/uibase/ribbar/drawbase.cxx @@ -485,28 +485,28 @@ void SwDrawBase::EnterSelectMode(const MouseEvent& rMEvt) { m_pWin->SetDrawAction(false); - if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction()) - { - Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); + if (m_pSh->IsObjSelected() || m_pWin->IsDrawAction()) + return; - if (m_pSh->IsObjSelectable(aPnt)) - { - m_pSh->SelectObj(aPnt); - if (rMEvt.GetModifier() == KEY_SHIFT || !m_pSh->IsObjSelected()) - { - m_pView->LeaveDrawCreate(); // Switch to selection mode + Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel())); - m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); - } - } - else + if (m_pSh->IsObjSelectable(aPnt)) + { + m_pSh->SelectObj(aPnt); + if (rMEvt.GetModifier() == KEY_SHIFT || !m_pSh->IsObjSelected()) { - m_pView->LeaveDrawCreate(); - if (m_pSh->IsSelFrameMode()) - m_pSh->LeaveSelFrameMode(); + m_pView->LeaveDrawCreate(); // Switch to selection mode + + m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW); } - m_pView->NoRotate(); } + else + { + m_pView->LeaveDrawCreate(); + if (m_pSh->IsSelFrameMode()) + m_pSh->LeaveSelFrameMode(); + } + m_pView->NoRotate(); } void SwDrawBase::CreateDefaultObject() |