Kirix Support Forums

Bugfix: Floatable(false) works for toolbars

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

Bugfix: Floatable(false) works for toolbars

Postby abligh on Thu Feb 02, 2006 2:47 pm

It is not possible to set toolbars so they are not floatable on a per-toolbar basis. The following patch fixes this (against 0.9.1), such that you can have toolbars which can't be detached, but can still be moved by their gripper.

Code: Select all
Index: wxXtra/manager.cpp
===================================================================
--- wxXtra/manager.cpp  (revision 366)
+++ wxXtra/manager.cpp  (working copy)
@@ -2747,7 +2747,8 @@
         // should float if being dragged over center pane windows
         if (!part->dock->fixed || part->dock->dock_direction == wxAUI_DOCK_CENTER)
         {
-            if ((m_flags & wxAUI_MGR_ALLOW_FLOATING))
+            if ((m_flags & wxAUI_MGR_ALLOW_FLOATING) && (drop.IsFloatable() || (part->dock->dock_direction != wxAUI_DOCK_CENTER
+    && part->dock->dock_direction != wxAUI_DOCK_NONE)))
                 drop.Float();
             return ProcessDockResult(target, drop);
         }
abligh
Registered User
 
Posts: 59
Joined: Sun Jan 01, 2006 2:31 pm

Return to wxAUI Patches & Modifications