mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
fixed icon import
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
694840937b
commit
6a19f2dae8
2 changed files with 4 additions and 3 deletions
|
|
@ -334,13 +334,15 @@ void InstanceImportTask::processMultiMC()
|
|||
m_instIcon = instance.iconKey();
|
||||
|
||||
auto importIconPath = IconUtils::findBestIconIn(instance.instanceRoot(), m_instIcon);
|
||||
if (importIconPath.isNull() || !QFile::exists(importIconPath))
|
||||
importIconPath = IconUtils::findBestIconIn(instance.instanceRoot(), "icon.png");
|
||||
if (!importIconPath.isNull() && QFile::exists(importIconPath)) {
|
||||
// import icon
|
||||
auto iconList = APPLICATION->icons();
|
||||
if (iconList->iconFileExists(m_instIcon)) {
|
||||
iconList->deleteIcon(m_instIcon);
|
||||
}
|
||||
iconList->installIcons({ importIconPath });
|
||||
iconList->installIcon(importIconPath, m_instIcon);
|
||||
}
|
||||
}
|
||||
emitSucceeded();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue