Check for an image list before complaining in OnGetItemImage
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d66699e2d9
commit
611a725ecd
@ -5383,9 +5383,9 @@ wxString wxGenericListCtrl::OnGetItemText(long WXUNUSED(item), long WXUNUSED(col
|
||||
|
||||
int wxGenericListCtrl::OnGetItemImage(long WXUNUSED(item)) const
|
||||
{
|
||||
// same as above
|
||||
wxFAIL_MSG( _T("wxGenericListCtrl::OnGetItemImage not supposed to be called") );
|
||||
|
||||
wxCHECK_MSG(!GetImageList(wxIMAGE_LIST_SMALL),
|
||||
-1,
|
||||
wxT("List control has an image list, OnGetItemImage should be overridden."));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -2376,9 +2376,9 @@ wxString wxListCtrl::OnGetItemText(long WXUNUSED(item), long WXUNUSED(col)) cons
|
||||
|
||||
int wxListCtrl::OnGetItemImage(long WXUNUSED(item)) const
|
||||
{
|
||||
// same as above
|
||||
wxFAIL_MSG( _T("wxListCtrl::OnGetItemImage not supposed to be called") );
|
||||
|
||||
wxCHECK_MSG(!GetImageList(wxIMAGE_LIST_SMALL),
|
||||
-1,
|
||||
wxT("List control has an image list, OnGetItemImage should be overridden."));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user