Kirix Support Forums

Patch to ensure deletion of floating panes

Please post any wxAUI patches or modifications you've created here. Thanks!

Patch to ensure deletion of floating panes

Postby abligh on Tue Apr 18, 2006 2:52 pm

As per recent post to the Questions forum, how about this?

Code: Select all
--- src/manager.cpp     (revision 836)
+++ src/manager.cpp     (working copy)
@@ -1535,6 +1535,26 @@
     {
         if (m_panes.Item(i).window == window)
         {
+
+            wxPaneInfo& p = m_panes.Item(i);
+
+            if (p.frame)
+            {
+                // we have a floating frame, so we need to
+                // reparent it to m_frame and destroy the floating frame
+
+                // reduce flicker - we assume the caller will resize the denuded window
+
+                p.window->SetSize(1,1);
+                p.frame->Show(false);
+
+                // reparent to m_frame and destroy the pane
+                p.window->Reparent(m_frame);
+                p.frame->SetSizer(NULL);
+                p.frame->Destroy();
+                p.frame = NULL;
+            }
+
             m_panes.RemoveAt(i);
             return true;
         }
abligh
Registered User
 
Posts: 59
Joined: Sun Jan 01, 2006 2:31 pm

Postby Ben on Wed Apr 19, 2006 6:51 am

Applied. Thanks.

Ben
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Postby abligh on Wed Apr 19, 2006 10:16 am

bwilliams wrote:Applied. Thanks.

Ben


Thanks. It's now on my patches site (http://www.alex.org.uk/wxAUI/index.html)

Which of the patches on there are you taking / not taking for 0.9.2?

Alex
abligh
Registered User
 
Posts: 59
Joined: Sun Jan 01, 2006 2:31 pm

Postby Ben on Wed Apr 19, 2006 11:04 am

Hi Alex,

The following patches were merged-- many thanks!
    checkpartreturn.p
    equality-typo.p
    noemptyhintrect.p
    unused-vars.p
    set-idle-flag.p
    mac.p
    skip-unused-events.p
    selectivefloating.p


I didn't want to cut any deeper this time around. Next cycle will probably be more invasive, and then we'll take another look at your remaining patches. Again, thanks much.

Best,
Ben
User avatar
Ben
Kirix Support Team
 
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Return to wxAUI Patches & Modifications