Fixed always loading 1x, 2x and 3x images

This commit is contained in:
fourtf
2019-08-13 13:42:38 +02:00
parent 294c2aecdc
commit 6274c05520
5 changed files with 19 additions and 10 deletions
@@ -120,7 +120,7 @@ void ImageLayoutElement::paint(QPainter &painter)
return;
}
auto pixmap = this->image_->pixmap();
auto pixmap = this->image_->pixmapOrLoad();
if (pixmap && !this->image_->animated())
{
// fourtf: make it use qreal values
@@ -137,7 +137,7 @@ void ImageLayoutElement::paintAnimated(QPainter &painter, int yOffset)
if (this->image_->animated())
{
if (auto pixmap = this->image_->pixmap())
if (auto pixmap = this->image_->pixmapOrLoad())
{
auto rect = this->getRect();
rect.moveTop(rect.y() + yOffset);