test for valid icon

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2007-12-02 13:51:45 +00:00
parent 959f1933e3
commit c576a25a19

View File

@ -571,9 +571,14 @@ bool wxDataViewIconTextRenderer::Render(void)
// variable definition:
wxMacCFStringHolder cfString(iconText.GetText(),(this->GetView()->GetFont().Ok() ? this->GetView()->GetFont().GetEncoding() : wxLocale::GetSystemEncoding()));
if (iconText.GetIcon().IsOk())
{
if (::SetDataBrowserItemDataIcon(this->GetDataReference(),MAC_WXHICON(iconText.GetIcon().GetHICON())) != noErr)
return false;
}
return ((::SetDataBrowserItemDataIcon(this->GetDataReference(),MAC_WXHICON(iconText.GetIcon().GetHICON())) == noErr) &&
(::SetDataBrowserItemDataText(this->GetDataReference(),cfString) == noErr));
return (::SetDataBrowserItemDataText(this->GetDataReference(),cfString) == noErr);
} /* if */
else
return false;