summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-01-11 11:12:58 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-01-18 11:34:06 +0000
commit5120445c24947c55798dc335f8385e0de64d6a1b (patch)
tree4a71572326ae139aa777e57645e3dd5563695732 /sw
parent58260f32380e6bef993517a0ab32f7e09d09bb21 (diff)
avoid Mouse Not Captured warning
Change-Id: I832e7f891d2f37775e266942320c12c536adcc9d
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/ribbar/drawbase.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/uibase/ribbar/drawbase.cxx b/sw/source/uibase/ribbar/drawbase.cxx
index adb095a7fb16..b47366b01bf2 100644
--- a/sw/source/uibase/ribbar/drawbase.cxx
+++ b/sw/source/uibase/ribbar/drawbase.cxx
@@ -443,10 +443,11 @@ void SwDrawBase::Deactivate()
m_pWin->SetDrawAction(false);
- m_pWin->ReleaseMouse();
+ if (m_pWin->IsMouseCaptured())
+ m_pWin->ReleaseMouse();
g_bNoInterrupt = false;
- if(m_pWin->GetApplyTemplate())
+ if (m_pWin->GetApplyTemplate())
m_pWin->SetApplyTemplate(SwApplyTemplate());
m_pSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_INSERT_DRAW);
}