Fix bug in OPIcon class

Thanks to @Floessie for the fix
This commit is contained in:
Hombre 2019-03-26 22:53:33 +01:00
parent b76b630ec8
commit 390594f39e
1 changed files with 5 additions and 5 deletions

View File

@ -731,23 +731,23 @@ OPIcon::OPIcon(Glib::ustring normalImage, Glib::ustring activeImage, Glib::ustri
Glib::ustring draggedImage, Glib::ustring insensitiveImage, DrivenPoint drivenPoint) : drivenPoint(drivenPoint)
{
if (!normalImage.empty()) {
normalImg->setImage(normalImage);
normalImg = Cairo::RefPtr<RTSurface>(new RTSurface(normalImage));
}
if (!prelightImage.empty()) {
prelightImg->setImage(prelightImage);
prelightImg = Cairo::RefPtr<RTSurface>(new RTSurface(prelightImage));
}
if (!activeImage.empty()) {
activeImg->setImage(activeImage);
activeImg = Cairo::RefPtr<RTSurface>(new RTSurface(activeImage));
}
if (!draggedImage.empty()) {
draggedImg->setImage(draggedImage);
draggedImg = Cairo::RefPtr<RTSurface>(new RTSurface(draggedImage));
}
if (!insensitiveImage.empty()) {
insensitiveImg->setImage(insensitiveImage);
insensitiveImg = Cairo::RefPtr<RTSurface>(new RTSurface(insensitiveImage));
}
}