// wxStatusBarBase implementation
// ============================================================================
-// IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow) This doesn't beling here, RR
+IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow)
// ----------------------------------------------------------------------------
// ctor/dtor
if ( m_statusWidths == NULL )
{
- // default: all fields have the same width
- int nWidth = widthTotal / m_nFields;
- for ( int i = 0; i < m_nFields; i++ )
+ if ( m_nFields )
{
- widths.Add(nWidth);
+ // default: all fields have the same width
+ int nWidth = widthTotal / m_nFields;
+ for ( int i = 0; i < m_nFields; i++ )
+ {
+ widths.Add(nWidth);
+ }
}
+ //else: we're empty anyhow
}
else // have explicit status widths
{