Kirix Support Forums

Problems with DetachPane on floating windows

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

Problems with DetachPane on floating windows

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

I have floating wxPanel managed by wxAUI.

When I want to destroy a panel, I do this:


which I think should work. However, if the panel is floating, there appears to be a problem, in that as far as I can tell the floating window containing the panel (the wxFloatingPane) never gets destroyed.

What seems to happen is DetachPane calls m_panes.RemoveAt() which removes it from the list of panes. This prevents the Update routine doing what happens when (say) Float() is turned off, and doing a reparent to the main frame and destroying the wxFloatingPane.

I think DetachPane() should be checking for m_panes.Item(i).p_frame and if it is non-null, doing the reparent and destroy (as per Update()) before it removes it from the m_panes array, because Update() will never get to do this afterwards.

What do you think? I can produce a patch if necessary

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

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

Agreed. I'll make it perform this behavior. I'm glad we caught this before 0.9.2.

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

Return to wxAUI Questions, Thoughts & Feedback