Fix aoimage masking being enabled by default (#703)

This commit is contained in:
Crystalwarrior 2022-03-25 16:00:20 +03:00 committed by GitHub
parent e0c67124a6
commit 7af4d285c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -22,6 +22,8 @@ public:
bool is_static = false;
bool masked = false;
bool set_image(QString p_image, QString p_misc = "");
void set_size_and_pos(QString identifier);
};

View File

@ -17,7 +17,9 @@ AOImage::AOImage(QWidget *parent, AOApplication *p_ao_app, bool make_static) : Q
f_pixmap =
f_pixmap.scaled(this->size(), Qt::IgnoreAspectRatio);
this->setPixmap(f_pixmap);
this->setMask(f_pixmap.mask());
if (masked) {
this->setMask(f_pixmap.mask());
}
});
}
}
@ -49,7 +51,9 @@ bool AOImage::set_image(QString p_image, QString p_misc)
f_pixmap =
f_pixmap.scaled(this->size(), Qt::IgnoreAspectRatio);
this->setPixmap(f_pixmap);
this->setMask(f_pixmap.mask());
if (masked) {
this->setMask(f_pixmap.mask());
}
}
return true;
}