- // copy stacks if present
- if(m_statusTextStacks)
- {
- wxListString **newStacks = new wxListString*[number];
- size_t i, j, max = wxMin(number, m_nFields);
-
- // copy old stacks
- for(i = 0; i < max; ++i)
- newStacks[i] = m_statusTextStacks[i];
- // free old stacks in excess
- for(j = i; j < (size_t)m_nFields; ++j)
- {
- if(m_statusTextStacks[j])
- {
- m_statusTextStacks[j]->Clear();
- delete m_statusTextStacks[j];
- }
- }
- // initialize new stacks to NULL
- for(j = i; j < (size_t)number; ++j)
- newStacks[j] = 0;