git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11129
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// initialize the current item if needed
void UpdateCurrent();
// initialize the current item if needed
void UpdateCurrent();
+ // delete all items but don't refresh: called from dtor
+ void DoDeleteAllItems();
+
// called when an item is [un]focuded, i.e. becomes [not] current
//
// currently unused
// called when an item is [un]focuded, i.e. becomes [not] current
//
// currently unused
wxListMainWindow::~wxListMainWindow()
{
wxListMainWindow::~wxListMainWindow()
{
ResetVisibleLinesRange();
ResetVisibleLinesRange();
+ // scrollbars must be reset
+ m_dirty = TRUE;
}
int wxListMainWindow::GetSelectedItemCount()
}
int wxListMainWindow::GetSelectedItemCount()
void wxListMainWindow::RecalculatePositions()
{
void wxListMainWindow::RecalculatePositions()
{
- if ( IsEmpty() )
- return;
-
wxClientDC dc( this );
dc.SetFont( GetFont() );
wxClientDC dc( this );
dc.SetFont( GetFont() );
m_columns.DeleteNode( node );
}
m_columns.DeleteNode( node );
}
-void wxListMainWindow::DeleteAllItems()
+void wxListMainWindow::DoDeleteAllItems()
- // NB: don't just set m_dirty to TRUE here as RecalculatePositions()
- // doesn't do anything if the control is empty and so we won't be
- // refreshed
- Refresh();
+void wxListMainWindow::DeleteAllItems()
+{
+ DoDeleteAllItems();
+
+ RecalculatePositions();
}
void wxListMainWindow::DeleteEverything()
}
void wxListMainWindow::DeleteEverything()