summaryrefslogtreecommitdiffstats
path: root/logic/BaseInstance.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-05-25 07:35:43 +0200
committerPetr Mrázek <peterix@gmail.com>2015-05-25 07:35:43 +0200
commit185ff238c202f3db20f013cd18cfbd99c9878e8e (patch)
tree72711e8017f94e5a45bbddf56d30a91f6c816474 /logic/BaseInstance.cpp
parent09673cc16e73a5b126bdfd13e305c25c0ff993c2 (diff)
downloadMultiMC-185ff238c202f3db20f013cd18cfbd99c9878e8e.tar
MultiMC-185ff238c202f3db20f013cd18cfbd99c9878e8e.tar.gz
MultiMC-185ff238c202f3db20f013cd18cfbd99c9878e8e.tar.lz
MultiMC-185ff238c202f3db20f013cd18cfbd99c9878e8e.tar.xz
MultiMC-185ff238c202f3db20f013cd18cfbd99c9878e8e.zip
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
Diffstat (limited to 'logic/BaseInstance.cpp')
-rw-r--r--logic/BaseInstance.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/logic/BaseInstance.cpp b/logic/BaseInstance.cpp
index 0a0bc961..066d2642 100644
--- a/logic/BaseInstance.cpp
+++ b/logic/BaseInstance.cpp
@@ -153,18 +153,27 @@ qint64 BaseInstance::lastLaunch() const
void BaseInstance::setLastLaunch(qint64 val)
{
+ //FIXME: if no change, do not set. setting involves saving a file.
m_settings->set("lastLaunchTime", val);
emit propertiesChanged(this);
}
void BaseInstance::setGroupInitial(QString val)
{
+ if(m_group == val)
+ {
+ return;
+ }
m_group = val;
emit propertiesChanged(this);
}
void BaseInstance::setGroupPost(QString val)
{
+ if(m_group == val)
+ {
+ return;
+ }
setGroupInitial(val);
emit groupChanged();
}
@@ -176,6 +185,7 @@ QString BaseInstance::group() const
void BaseInstance::setNotes(QString val)
{
+ //FIXME: if no change, do not set. setting involves saving a file.
m_settings->set("notes", val);
}
@@ -186,6 +196,7 @@ QString BaseInstance::notes() const
void BaseInstance::setIconKey(QString val)
{
+ //FIXME: if no change, do not set. setting involves saving a file.
m_settings->set("iconKey", val);
emit propertiesChanged(this);
}
@@ -197,6 +208,7 @@ QString BaseInstance::iconKey() const
void BaseInstance::setName(QString val)
{
+ //FIXME: if no change, do not set. setting involves saving a file.
m_settings->set("name", val);
emit propertiesChanged(this);
}