changing the number of items in wxHtmlListBox should flush the cache
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21421 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -61,9 +61,9 @@ public:
|
|||||||
// destructor cleans up whatever resources we use
|
// destructor cleans up whatever resources we use
|
||||||
virtual ~wxHtmlListBox();
|
virtual ~wxHtmlListBox();
|
||||||
|
|
||||||
// refresh everything
|
// override some base class virtuals
|
||||||
virtual void RefreshAll();
|
virtual void RefreshAll();
|
||||||
|
virtual void SetItemCount(size_t count);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// this method must be implemented in the derived class and should return
|
// this method must be implemented in the derived class and should return
|
||||||
|
@@ -130,7 +130,7 @@ public:
|
|||||||
// set the number of items to be shown in the control
|
// set the number of items to be shown in the control
|
||||||
//
|
//
|
||||||
// this is just a synonym for wxVScrolledWindow::SetLineCount()
|
// this is just a synonym for wxVScrolledWindow::SetLineCount()
|
||||||
void SetItemCount(size_t count);
|
virtual void SetItemCount(size_t count);
|
||||||
|
|
||||||
// delete all items from the control
|
// delete all items from the control
|
||||||
void Clear() { SetItemCount(0); }
|
void Clear() { SetItemCount(0); }
|
||||||
|
@@ -262,6 +262,14 @@ void wxHtmlListBox::RefreshAll()
|
|||||||
wxVListBox::RefreshAll();
|
wxVListBox::RefreshAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxHtmlListBox::SetItemCount(size_t count)
|
||||||
|
{
|
||||||
|
// the items are going to change, forget the old ones
|
||||||
|
m_cache->Clear();
|
||||||
|
|
||||||
|
wxVListBox::SetItemCount(count);
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxHtmlListBox implementation of wxVListBox pure virtuals
|
// wxHtmlListBox implementation of wxVListBox pure virtuals
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user