summaryrefslogtreecommitdiffstats
path: root/logic/BaseInstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/BaseInstance.cpp')
-rw-r--r--logic/BaseInstance.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/logic/BaseInstance.cpp b/logic/BaseInstance.cpp
index bc82fee1..b39db03b 100644
--- a/logic/BaseInstance.cpp
+++ b/logic/BaseInstance.cpp
@@ -27,6 +27,7 @@
#include "pathutils.h"
#include "lists/MinecraftVersionList.h"
+#include "logic/icons/IconList.h"
BaseInstance::BaseInstance(BaseInstancePrivate *d_in, const QString &rootDir,
SettingsObject *settings_obj, QObject *parent)
@@ -38,6 +39,7 @@ BaseInstance::BaseInstance(BaseInstancePrivate *d_in, const QString &rootDir,
settings().registerSetting(new Setting("name", "Unnamed Instance"));
settings().registerSetting(new Setting("iconKey", "default"));
+ connect(MMC->icons().get(), SIGNAL(iconUpdated(QString)), SLOT(iconUpdated(QString)));
settings().registerSetting(new Setting("notes", ""));
settings().registerSetting(new Setting("lastLaunchTime", 0));
@@ -93,6 +95,14 @@ BaseInstance::BaseInstance(BaseInstancePrivate *d_in, const QString &rootDir,
"AutoCloseConsole", globalSettings->getSetting("AutoCloseConsole")));
}
+void BaseInstance::iconUpdated(QString key)
+{
+ if(iconKey() == key)
+ {
+ emit propertiesChanged(this);
+ }
+}
+
void BaseInstance::nuke()
{
QDir(instanceRoot()).removeRecursively();