GH-992 GH-997 Do not rewrite values when loading FTB packs

name, icon and notes won't be overwritten when loading FTB packs
this also eliminates the file saving delay from setting the values
This commit is contained in:
Petr Mrázek
2015-05-25 07:35:43 +02:00
parent 09673cc16e
commit 185ff238c2
2 changed files with 19 additions and 1 deletions

View File

@ -161,13 +161,19 @@ InstancePtr loadInstance(SettingsObjectPtr globalSettings, QMap<QString, QString
inst->init();
qDebug() << "Init " << record.instanceDir;
inst->setGroupInitial("FTB");
/**
* FIXME: this does not respect the user's preferences. BUT, it would work nicely with the planned pack support
* -> instead of changing the user values, change pack values (defaults you can look at and revert to)
*/
/*
inst->setName(record.name);
inst->setIconKey(record.iconKey);
inst->setNotes(record.description);
*/
if (inst->intendedVersionId() != record.mcVersion)
{
inst->setIntendedVersionId(record.mcVersion);
}
inst->setNotes(record.description);
qDebug() << "Post-Process " << record.instanceDir;
if (!InstanceList::continueProcessInstance(inst, InstanceList::NoCreateError, record.instanceDir, groupMap))
{