- // 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;
-
- m_statusTextStacks = newStacks;
- }
-
- // Resize styles array
- if (m_statusStyles)
- {
- int *oldStyles = m_statusStyles;
- m_statusStyles = new int[number];
- int i, max = wxMin(number, m_nFields);
-
- // copy old styles
- for (i = 0; i < max; ++i)
- m_statusStyles[i] = oldStyles[i];
-
- // initialize new styles to wxSB_NORMAL
- for (i = max; i < number; ++i)
- m_statusStyles[i] = wxSB_NORMAL;