bug fix
parent
b739f4506b
commit
ba4be72918
|
@ -43,11 +43,11 @@ void ElementPoolWidget::setElementList(std::vector<GraphicElement*> elements) {
|
||||||
QPainter* painter = new QPainter();
|
QPainter* painter = new QPainter();
|
||||||
QImage* image = new QImage(QSize(iconWidth - 25, iconHeight - 25), QImage::Format_ARGB32);
|
QImage* image = new QImage(QSize(iconWidth - 25, iconHeight - 25), QImage::Format_ARGB32);
|
||||||
image->fill(Qt::transparent);
|
image->fill(Qt::transparent);
|
||||||
pItem->setIcon(QIcon(QPixmap::fromImage(*image)));
|
|
||||||
pItem->setSizeHint(QSize(iconWidth, iconHeight));
|
|
||||||
painter->begin(image);
|
painter->begin(image);
|
||||||
elements[index]->paintPreview(painter);
|
elements[index]->paintPreview(painter);
|
||||||
painter->end();
|
painter->end();
|
||||||
|
pItem->setIcon(QIcon(QPixmap::fromImage(*image)));
|
||||||
|
pItem->setSizeHint(QSize(iconWidth, iconHeight));
|
||||||
pictureList->insertItem(index, pItem);
|
pictureList->insertItem(index, pItem);
|
||||||
}
|
}
|
||||||
if(elements.size() > 0)
|
if(elements.size() > 0)
|
||||||
|
|
Loading…
Reference in New Issue