don't renumber dock rows to remove gaps

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Benjamin Williams
2007-11-06 17:02:16 +00:00
parent fbe979db94
commit 5507f0848f

View File

@@ -430,6 +430,9 @@ static void RemovePaneFromDocks(wxAuiDockInfoArray& docks,
}
}
/*
// This function works fine, and may be used in the future
// RenumberDockRows() takes a dock and assigns sequential numbers
// to existing rows. Basically it takes out the gaps; so if a
// dock has rows with numbers 0,2,5, they will become 0,1,2
@@ -441,14 +444,12 @@ static void RenumberDockRows(wxAuiDockInfoPtrArray& docks)
wxAuiDockInfo& dock = *docks.Item(i);
dock.dock_row = i;
// (BIW) I believe these lines are wrong because they are modifying
// the original pane structures, which should be avoided as much
// as possible.
//for (j = 0, pane_count = dock.panes.GetCount(); j < pane_count; ++j)
// dock.panes.Item(j)->dock_row = i;
int j, pane_count;
for (j = 0, pane_count = dock.panes.GetCount(); j < pane_count; ++j)
dock.panes.Item(j)->dock_row = i;
}
}
*/
// SetActivePane() sets the active pane, as well as cycles through
@@ -2173,7 +2174,6 @@ wxSizer* wxAuiManager::LayoutAll(wxAuiPaneInfoArray& panes,
// find any top docks in this layer
FindDocks(docks, wxAUI_DOCK_TOP, layer, -1, arr);
RenumberDockRows(arr);
if (!arr.IsEmpty())
{
for (row = 0, row_count = arr.GetCount(); row < row_count; ++row)
@@ -2188,7 +2188,6 @@ wxSizer* wxAuiManager::LayoutAll(wxAuiPaneInfoArray& panes,
// find any left docks in this layer
FindDocks(docks, wxAUI_DOCK_LEFT, layer, -1, arr);
RenumberDockRows(arr);
if (!arr.IsEmpty())
{
for (row = 0, row_count = arr.GetCount(); row < row_count; ++row)
@@ -2227,7 +2226,6 @@ wxSizer* wxAuiManager::LayoutAll(wxAuiPaneInfoArray& panes,
// find any right docks in this layer
FindDocks(docks, wxAUI_DOCK_RIGHT, layer, -1, arr);
RenumberDockRows(arr);
if (!arr.IsEmpty())
{
for (row = arr.GetCount()-1; row >= 0; --row)
@@ -2240,7 +2238,6 @@ wxSizer* wxAuiManager::LayoutAll(wxAuiPaneInfoArray& panes,
// find any bottom docks in this layer
FindDocks(docks, wxAUI_DOCK_BOTTOM, layer, -1, arr);
RenumberDockRows(arr);
if (!arr.IsEmpty())
{
for (row = arr.GetCount()-1; row >= 0; --row)