updated button.icon

Now passing an empty image to button.icon() the previous image is erased from button
This commit is contained in:
besh81 2018-12-06 09:03:51 +01:00
parent f4c71db98b
commit fc3478b220

View File

@ -379,7 +379,15 @@ namespace nana{ namespace drawerbase
void trigger::icon(const nana::paint::image& img)
{
if(img.empty()) return;
if(img.empty())
{
if(attr_.icon)
{
delete attr_.icon;
attr_.icon = 0;
}
return;
}
if(nullptr == attr_.icon)
attr_.icon = new paint::image;