]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/stc/stc.cpp.in
disable the first top level parent, not the topmost top level parent
[wxWidgets.git] / contrib / src / stc / stc.cpp.in
index 11f590c9a47e392a6e2075454dee23bf7d730b82..a52798705e5e8a8a8d66dfc1a80e626d71e4631a 100644 (file)
@@ -529,7 +529,10 @@ void wxStyledTextCtrl::OnKeyDown(wxKeyEvent& evt) {
 
 
 void wxStyledTextCtrl::OnLoseFocus(wxFocusEvent& evt) {
-    m_swx->DoLoseFocus();
+#ifdef __WXMAC__
+    if (! (IsBeingDeleted() || GetParent()->IsBeingDeleted()))
+#endif
+        m_swx->DoLoseFocus();
     evt.Skip();
 }