summaryrefslogtreecommitdiff
path: root/vcl/source/window/toolbox2.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-11-30 16:18:35 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-11-30 16:43:30 +0000
commita4e58b509828d806513217efc03134845629cccd (patch)
treea94aca090dd423d6343bf4420fb59ff2d6a1922d /vcl/source/window/toolbox2.cxx
parentc2f13bd8dff4526cdfca2eef7770feae3da8bf3a (diff)
silence ReleaseMouse warning
Change-Id: I615b4877ab29075ed45149259260acfb2563cad8
Diffstat (limited to 'vcl/source/window/toolbox2.cxx')
-rw-r--r--vcl/source/window/toolbox2.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index dddb65fba628..2bcb44ec85b9 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1335,7 +1335,8 @@ void ToolBox::EndSelection()
if (mnCurPos != TOOLBOX_ITEM_NOTFOUND)
InvalidateItem(mnCurPos);
EndTracking();
- ReleaseMouse();
+ if (IsMouseCaptured())
+ ReleaseMouse();
Deactivate();
}
@@ -1378,7 +1379,8 @@ void ToolBox::SetItemDown( sal_uInt16 nItemId, bool bDown, bool bRelease )
mbDrag = false;
mbSelection = false;
EndTracking();
- ReleaseMouse();
+ if (IsMouseCaptured())
+ ReleaseMouse();
Deactivate();
}