wxArtProvider fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -895,11 +895,15 @@ wxBitmap wxXmlResourceHandler::GetBitmap(const wxString& param,
|
|||||||
wxString sid = bmpNode->GetPropVal(wxT("stock_id"), wxEmptyString);
|
wxString sid = bmpNode->GetPropVal(wxT("stock_id"), wxEmptyString);
|
||||||
if ( !sid.empty() )
|
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 =
|
wxBitmap stockArt =
|
||||||
wxArtProvider::GetBitmap(wxART_MAKE_ART_ID_FROM_STR(sid),
|
wxArtProvider::GetBitmap(wxART_MAKE_ART_ID_FROM_STR(sid),
|
||||||
wxART_MAKE_CLIENT_ID_FROM_STR(scl),
|
scl, size);
|
||||||
size);
|
|
||||||
if ( stockArt.Ok() )
|
if ( stockArt.Ok() )
|
||||||
return stockArt;
|
return stockArt;
|
||||||
}
|
}
|
||||||
|
@@ -895,11 +895,15 @@ wxBitmap wxXmlResourceHandler::GetBitmap(const wxString& param,
|
|||||||
wxString sid = bmpNode->GetPropVal(wxT("stock_id"), wxEmptyString);
|
wxString sid = bmpNode->GetPropVal(wxT("stock_id"), wxEmptyString);
|
||||||
if ( !sid.empty() )
|
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 =
|
wxBitmap stockArt =
|
||||||
wxArtProvider::GetBitmap(wxART_MAKE_ART_ID_FROM_STR(sid),
|
wxArtProvider::GetBitmap(wxART_MAKE_ART_ID_FROM_STR(sid),
|
||||||
wxART_MAKE_CLIENT_ID_FROM_STR(scl),
|
scl, size);
|
||||||
size);
|
|
||||||
if ( stockArt.Ok() )
|
if ( stockArt.Ok() )
|
||||||
return stockArt;
|
return stockArt;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user