git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43323
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
All:
- wxArrayString::Alloc() now works as reserve() and doesn't clear array contents
+- Fixed long standing bug in wxFileConfig groups renaming (Antti Koivisto)
wxMSW:
{
wxCHECK_RET( m_pParent, _T("the root group can't be renamed") );
+ if ( newName == m_strName )
+ return;
+
+ // we need to remove the group from the parent and it back under the new
+ // name to keep the parents array of subgroups alphabetically sorted
+ m_pParent->m_aSubgroups.Remove(this);
+
m_strName = newName;
+ m_pParent->m_aSubgroups.Add(this);
+
// update the group lines recursively
UpdateGroupAndSubgroupsLines();
}