Patch #1688 2006-12-04 19:22

sethjackson

wxStatusBar::Destroy()
Download
1688-wxStatusBar_De.patch (759 bytes)
Category
Application::Refinement
Status
Accepted
Close date
2007-04-12 11:59
Assigned to
 
Index: src/src/main.cpp
===================================================================
--- src/src/main.cpp    (revision 3336)
+++ src/src/main.cpp    (working copy)
@@ -3336,19 +3336,19 @@
 void MainFrame::OnToggleStatusBar(wxCommandEvent& event)
 {
     wxStatusBar* sb = GetStatusBar();
+
     if (sb)
     {
         sb->Hide();
-        SetStatusBar(NULL);
+
+        SetStatusBar(0);
+
+        sb->Destroy();
     }
+
     else
         DoCreateStatusBar();
 
-// under Windows, the statusbar doesn't disappear immediately...
-#ifdef __WXMSW__
-    SendSizeEvent(); // make sure everything is laid out properly
-    Manager::ProcessPendingEvents(); // Tell wxWindows to process the event we just sent
-#endif // __WXMSW__
     DoUpdateStatusBar();
 }
 
sethjackson 2006-12-04 19:24

Need to delete the wxStatusBar after SetStatusBar(0).

Also that event code can go bye-bye it isn't needed anymore. :)

killerbot 2006-12-06 19:30

will test this one out for a day tomorrow ;-)

mandrav 2007-04-12 11:59

Patch applied, thank you.