Revert to using wxBaseObjectArray for wxAuiPaneInfoArray

This reverts changes to one of the arrays in 39706e4db0 (Use wxBaseArray
instead of object arrays in wxAuiManager, 2023-04-11) as this array is
returned by wxAuiManager::GetPane() and the existing code relies on the
references to the elements of this array remaining stable even if the
array is modified, which would be impossible with an array storing the
objects directly, so return to storing heap-allocated pointers to it.

There should be no such problems with the other arrays changed by that
commit, so leave them unchanged.

Closes #23545.
This commit is contained in:
Vadim Zeitlin 2023-05-16 00:12:27 +01:00
parent 0188fd95ac
commit 563cc11151

View file

@ -130,7 +130,6 @@ class wxAuiManagerEvent;
using wxAuiDockUIPartArray = wxBaseArray<wxAuiDockUIPart>;
using wxAuiDockInfoArray = wxBaseArray<wxAuiDockInfo>;
using wxAuiPaneInfoArray = wxBaseArray<wxAuiPaneInfo>;
using wxAuiDockInfoPtrArray = wxBaseArray<wxAuiDockInfo*>;
using wxAuiPaneInfoPtrArray = wxBaseArray<wxAuiPaneInfo*>;
@ -394,6 +393,13 @@ public:
};
// Note that this one must remain a wxBaseObjectArray, i.e. store pointers to
// heap-allocated objects, as it is returned by wxAuiManager::GetPane() and the
// existing code expects these pointers to remain valid even if the array is
// modified.
using wxAuiPaneInfoArray = wxBaseObjectArray<wxAuiPaneInfo>;
class WXDLLIMPEXP_FWD_AUI wxAuiFloatingFrame;