]> git.saurik.com Git - wxWidgets.git/commitdiff
Process capture lost event to avoid assertion
authorJulian Smart <julian@anthemion.co.uk>
Fri, 29 Dec 2006 19:37:04 +0000 (19:37 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 29 Dec 2006 19:37:04 +0000 (19:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/richtext/richtextctrl.h
src/richtext/richtextctrl.cpp

index 36063e01571fdb61b8ec77bc77bdc4ce0c5e60ba..1cd42ec016ddad53a5f46f4240859dbbb0ad0c2b 100644 (file)
@@ -600,6 +600,7 @@ public:
 
     void Command(wxCommandEvent& event);
     void OnDropFiles(wxDropFilesEvent& event);
+    void OnCaptureLost(wxMouseCaptureLostEvent& event);
 
     void OnCut(wxCommandEvent& event);
     void OnCopy(wxCommandEvent& event);
index 749eba3829617a3dc30f5153b7dd7ce5ba2801c6..5995b29fb8d4dd597a7f6ca5c7f615ca8cfbd135 100644 (file)
@@ -74,6 +74,7 @@ BEGIN_EVENT_TABLE( wxRichTextCtrl, wxControl )
     EVT_SIZE(wxRichTextCtrl::OnSize)
     EVT_SET_FOCUS(wxRichTextCtrl::OnSetFocus)
     EVT_KILL_FOCUS(wxRichTextCtrl::OnKillFocus)
+    EVT_MOUSE_CAPTURE_LOST(wxRichTextCtrl::OnCaptureLost)
     EVT_CONTEXT_MENU(wxRichTextCtrl::OnContextMenu)
 
     EVT_MENU(wxID_UNDO, wxRichTextCtrl::OnUndo)
@@ -325,6 +326,11 @@ void wxRichTextCtrl::OnKillFocus(wxFocusEvent& WXUNUSED(event))
     //    Refresh(false);
 }
 
+void wxRichTextCtrl::OnCaptureLost(wxMouseCaptureLostEvent& WXUNUSED(event))
+{
+    m_dragging = false;    
+}
+
 /// Left-click
 void wxRichTextCtrl::OnLeftClick(wxMouseEvent& event)
 {