Commit 938863c3 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

Fix wrong size of picture when switching from file with only IDv1.

parent 31e00e44
......@@ -108,7 +108,8 @@ void PictureLabel::setData(const QByteArray& data)
// creating new pixmap
QPixmap pm;
if (pm.loadFromData(data)) {
QPixmap scaledPm = pm.scaled(width(), height(), Qt::KeepAspectRatio);
int dimension = m_pictureLabel->width();
QPixmap scaledPm = pm.scaled(dimension, dimension, Qt::KeepAspectRatio);
if (!scaledPm.isNull()) {
m_pixmapHash = hash;
m_pictureLabel->setContentsMargins(0, 0, 0, 0);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment