ensured that the variant is allways uppercase

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2023-10-26 13:37:25 +03:00
parent 44cdf3f697
commit 8b8ea2d270
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318
2 changed files with 3 additions and 3 deletions

View File

@ -106,7 +106,7 @@ bool SkinList::update()
auto path = m_dir.absoluteFilePath(name);
if (skinTexture.loadFromData(skin.data, "PNG") && skinTexture.save(path)) {
SkinModel s(path);
s.setModel(skin.variant == "SLIM" ? SkinModel::SLIM : SkinModel::CLASSIC);
s.setModel(skin.variant.toUpper() == "SLIM" ? SkinModel::SLIM : SkinModel::CLASSIC);
s.setCapeId(m_acct->accountData()->minecraftProfile.currentCape);
s.setURL(skin.url);
newSkins << s;
@ -114,7 +114,7 @@ bool SkinList::update()
}
} else {
nskin->setCapeId(m_acct->accountData()->minecraftProfile.currentCape);
nskin->setModel(skin.variant == "SLIM" ? SkinModel::SLIM : SkinModel::CLASSIC);
nskin->setModel(skin.variant.toUpper() == "SLIM" ? SkinModel::SLIM : SkinModel::CLASSIC);
}
}

View File

@ -460,7 +460,7 @@ void SkinManageDialog::on_userBtn_clicked()
dlg.execWithTask(job.get());
SkinModel s(path);
s.setModel(mcProfile.skin.variant == "SLIM" ? SkinModel::SLIM : SkinModel::CLASSIC);
s.setModel(mcProfile.skin.variant.toUpper() == "SLIM" ? SkinModel::SLIM : SkinModel::CLASSIC);
s.setURL(mcProfile.skin.url);
if (m_capes.contains(mcProfile.currentCape)) {
s.setCapeId(mcProfile.currentCape);