fix no cape select (#3511)

This commit is contained in:
Alexandru Ionut Tripon 2025-03-19 22:56:37 +02:00 committed by GitHub
commit 71e0c62fee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -223,6 +223,8 @@ void SkinManageDialog::on_capeCombo_currentIndexChanged(int index)
auto cape = m_capes.value(id.toString(), {});
if (!cape.isNull()) {
m_ui->capeImage->setPixmap(previewCape(cape).scaled(size() * (1. / 3), Qt::KeepAspectRatio, Qt::FastTransformation));
} else {
m_ui->capeImage->clear();
}
m_skinPreview->updateCape(cape);
if (auto skin = getSelectedSkin(); skin) {
@ -522,6 +524,8 @@ void SkinManageDialog::resizeEvent(QResizeEvent* event)
auto cape = m_capes.value(id.toString(), {});
if (!cape.isNull()) {
m_ui->capeImage->setPixmap(previewCape(cape).scaled(s, Qt::KeepAspectRatio, Qt::FastTransformation));
} else {
m_ui->capeImage->clear();
}
}