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:
Robin Dunn 2004-10-08 16:14:41 +00:00
parent d66699e2d9
commit 611a725ecd
2 changed files with 6 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;
}