]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/log.cpp
changed DoDragDrop(bool) into DoDragDrop(int) and added support for wxDrag_DefaultMov...
[wxWidgets.git] / src / common / log.cpp
index 4c58a331e24cc7e86a26f4482b604aab5ee77980..93842ef1007a5dd9635b8355f2aa381db075cec5 100644 (file)
@@ -764,13 +764,18 @@ void wxLogStream::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
 
 wxLogChain::wxLogChain(wxLog *logger)
 {
+    m_bPassMessages = TRUE;
+
     m_logNew = logger;
     m_logOld = wxLog::SetActiveTarget(this);
 }
 
 wxLogChain::~wxLogChain()
 {
-    delete m_logNew;
+    delete m_logOld;
+
+    if ( m_logNew != this )
+        delete m_logNew;
 }
 
 void wxLogChain::SetLog(wxLog *logger)
@@ -778,8 +783,6 @@ void wxLogChain::SetLog(wxLog *logger)
     if ( m_logNew != this )
         delete m_logNew;
 
-    wxLog::SetActiveTarget(logger);
-
     m_logNew = logger;
 }