]> git.saurik.com Git - wxWidgets.git/commitdiff
When the focus object changes, the old selection should be
authorJulian Smart <julian@anthemion.co.uk>
Fri, 30 Dec 2011 17:22:11 +0000 (17:22 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 30 Dec 2011 17:22:11 +0000 (17:22 +0000)
cancelled explicitly to avoid seeing multiple selections until the next
refresh.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextctrl.cpp

index 63cc1a288756ba4fdeaffc0a39d8d6a1275ddbfb..a06d393f0cd688c9d6f077bb2ea77b01b9ad43f1 100644 (file)
@@ -4142,6 +4142,9 @@ bool wxRichTextCtrl::SetFocusObject(wxRichTextParagraphLayoutBox* obj, bool setC
     wxRichTextParagraphLayoutBox* oldContainer = GetFocusObject();
     bool changingContainer = (m_focusObject != obj);
 
+    if (changingContainer && HasSelection())
+        SelectNone();
+
     m_focusObject = obj;
 
     if (!obj)