wxArtProvider fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-09-04 13:23:57 +00:00
parent f70c044346
commit b3e8529208
2 changed files with 14 additions and 6 deletions

View File

@@ -895,11 +895,15 @@ wxBitmap wxXmlResourceHandler::GetBitmap(const wxString& param,
wxString sid = bmpNode->GetPropVal(wxT("stock_id"), wxEmptyString);
if ( !sid.empty() )
{
wxString scl = bmpNode->GetPropVal(wxT("stock_client"), defaultArtClient);
wxString scl = bmpNode->GetPropVal(wxT("stock_client"), wxEmptyString);
if (scl.empty())
scl = defaultArtClient;
else
scl = wxART_MAKE_CLIENT_ID_FROM_STR(scl);
wxBitmap stockArt =
wxArtProvider::GetBitmap(wxART_MAKE_ART_ID_FROM_STR(sid),
wxART_MAKE_CLIENT_ID_FROM_STR(scl),
size);
scl, size);
if ( stockArt.Ok() )
return stockArt;
}