]> git.saurik.com Git - wxWidgets.git/commitdiff
Disable drag and drop if the control is not editable
authorJulian Smart <julian@anthemion.co.uk>
Tue, 3 Jan 2012 15:24:20 +0000 (15:24 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 3 Jan 2012 15:24:20 +0000 (15:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextctrl.cpp

index 05b81428377332762bf60750c87383922dbd4fd7..dfd6c701bef4a6fb51fc053c4e3a210cad287bdf 100644 (file)
@@ -564,7 +564,7 @@ void wxRichTextCtrl::OnLeftClick(wxMouseEvent& event)
 
 #if wxUSE_DRAG_AND_DROP
     // If there's no selection, or we're not inside it, this isn't an attempt to initiate Drag'n'Drop
 
 #if wxUSE_DRAG_AND_DROP
     // If there's no selection, or we're not inside it, this isn't an attempt to initiate Drag'n'Drop
-    if (HasSelection() && GetSelectionRange().ToInternal().Contains(position))
+    if (IsEditable() && HasSelection() && GetSelectionRange().ToInternal().Contains(position))
     {
         // This might be an attempt at initiating Drag'n'Drop. So set the time & flags
         m_preDrag = true;
     {
         // This might be an attempt at initiating Drag'n'Drop. So set the time & flags
         m_preDrag = true;