]> git.saurik.com Git - wxWidgets.git/commitdiff
readded layer insert code
authorBenjamin Williams <bwilliams@kirix.com>
Mon, 13 Nov 2006 09:51:57 +0000 (09:51 +0000)
committerBenjamin Williams <bwilliams@kirix.com>
Mon, 13 Nov 2006 09:51:57 +0000 (09:51 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43391 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/aui/framemanager.cpp

index fd31a4242ee4e428ac89d60d8ec65d4700010427..5339faebbbf22be91aca243165942630d1ce9fb6 100644 (file)
@@ -2550,7 +2550,11 @@ bool wxAuiManager::DoDrop(wxAuiDockInfoArray& docks,
     if (pt.x < layer_insert_offset &&
         pt.x > layer_insert_offset-auiLayerInsertPixels)
     {
+        int new_layer = wxMax(wxMax(GetMaxLayer(docks, wxAUI_DOCK_LEFT),
+                                GetMaxLayer(docks, wxAUI_DOCK_BOTTOM)),
+                                GetMaxLayer(docks, wxAUI_DOCK_TOP)) + 1;  
         drop.Dock().Left().
+             Layer(new_layer).
              Row(0).
              Position(pt.y - GetDockPixelOffset(drop) - offset.y);
         return ProcessDockResult(target, drop);
@@ -2558,7 +2562,11 @@ bool wxAuiManager::DoDrop(wxAuiDockInfoArray& docks,
     else if (pt.y < layer_insert_offset &&
              pt.y > layer_insert_offset-auiLayerInsertPixels)
     {
+        int new_layer = wxMax(wxMax(GetMaxLayer(docks, wxAUI_DOCK_TOP),
+                                GetMaxLayer(docks, wxAUI_DOCK_LEFT)),
+                                GetMaxLayer(docks, wxAUI_DOCK_RIGHT)) + 1;
         drop.Dock().Top().
+             Layer(new_layer).
              Row(0).
              Position(pt.x - GetDockPixelOffset(drop) - offset.x);
         return ProcessDockResult(target, drop);
@@ -2566,7 +2574,12 @@ bool wxAuiManager::DoDrop(wxAuiDockInfoArray& docks,
     else if (pt.x >= cli_size.x - layer_insert_offset &&
              pt.x < cli_size.x - layer_insert_offset + auiLayerInsertPixels)
     {
+        int new_layer = wxMax(wxMax(GetMaxLayer(docks, wxAUI_DOCK_RIGHT),
+                                GetMaxLayer(docks, wxAUI_DOCK_TOP)),
+                                GetMaxLayer(docks, wxAUI_DOCK_BOTTOM)) + 1; 
+                                
         drop.Dock().Right().
+             Layer(new_layer).
              Row(0).
              Position(pt.y - GetDockPixelOffset(drop) - offset.y);
         return ProcessDockResult(target, drop);