updated button.icon
Now passing an empty image to button.icon() the previous image is erased from button
This commit is contained in:
parent
f4c71db98b
commit
fc3478b220
@ -379,7 +379,15 @@ namespace nana{ namespace drawerbase
|
|||||||
|
|
||||||
void trigger::icon(const nana::paint::image& img)
|
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)
|
if(nullptr == attr_.icon)
|
||||||
attr_.icon = new paint::image;
|
attr_.icon = new paint::image;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user