]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
removed the strange __WXMSW__ test in AddFile(bitmap) -- why should this function...
[wxWidgets.git] / src / common / wincmn.cpp
index c40aa1d746070b42912850d697c976a42a95738a..03e49a2a0c49e9461eb0cd78e6abbc223b5110a8 100644 (file)
@@ -379,6 +379,12 @@ wxWindowBase::~wxWindowBase()
 #endif
 }
 
 #endif
 }
 
+bool wxWindowBase::IsBeingDeleted() const
+{
+    return m_isBeingDeleted ||
+            (!IsTopLevel() && m_parent && m_parent->IsBeingDeleted());
+}
+
 void wxWindowBase::SendDestroyEvent()
 {
     wxWindowDestroyEvent event;
 void wxWindowBase::SendDestroyEvent()
 {
     wxWindowDestroyEvent event;
@@ -2741,8 +2747,8 @@ bool wxWindowBase::TryValidator(wxEvent& wxVALIDATOR_PARAM(event))
     // is receiving the event
     if ( event.GetEventObject() == this )
     {
     // is receiving the event
     if ( event.GetEventObject() == this )
     {
-        wxValidator *validator = GetValidator();
-        if ( validator && validator->ProcessEvent(event) )
+        wxValidator * const validator = GetValidator();
+        if ( validator && validator->ProcessEventHere(event) )
         {
             return true;
         }
         {
             return true;
         }