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:
parent
959f1933e3
commit
c576a25a19
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user