mirror of
https://github.com/izzy2lost/WeeU.git
synced 2026-07-06 00:19:59 -07:00
Fix asserts in TitleManager and DownloadManager (#134)
This commit is contained in:
@@ -629,7 +629,13 @@ void wxDownloadManagerList::SortEntries()
|
||||
RefreshPage();
|
||||
}
|
||||
|
||||
void wxDownloadManagerList::RefreshPage() { RefreshItems(GetTopItem(), GetTopItem() + GetCountPerPage() + 1); }
|
||||
void wxDownloadManagerList::RefreshPage()
|
||||
{
|
||||
long item_count = GetItemCount();
|
||||
|
||||
if (item_count > 0)
|
||||
RefreshItems(GetTopItem(), std::min(item_count - 1, GetTopItem() + GetCountPerPage() + 1));
|
||||
}
|
||||
|
||||
int wxDownloadManagerList::Filter(const wxString& filter, const wxString& prefix, ItemColumn column)
|
||||
{
|
||||
|
||||
@@ -1170,7 +1170,13 @@ void wxTitleManagerList::SortEntries(int column)
|
||||
RefreshPage();
|
||||
}
|
||||
|
||||
void wxTitleManagerList::RefreshPage() { RefreshItems(GetTopItem(), GetTopItem() + GetCountPerPage() + 1); }
|
||||
void wxTitleManagerList::RefreshPage()
|
||||
{
|
||||
long item_count = GetItemCount();
|
||||
|
||||
if (item_count > 0)
|
||||
RefreshItems(GetTopItem(), std::min(item_count - 1, GetTopItem() + GetCountPerPage() + 1));
|
||||
}
|
||||
|
||||
int wxTitleManagerList::Filter(const wxString& filter, const wxString& prefix, ItemColumn column)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user