reduced flicker in the statusbar when resizing the window

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-03-15 00:12:25 +00:00
parent 6a317e6188
commit 5057e65939
2 changed files with 60 additions and 14 deletions

View File

@@ -127,12 +127,16 @@ wxArrayInt wxStatusBarBase::CalculateAbsWidths(wxCoord widthTotal) const
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
{