Commit 1c246389 authored by Stefan Majewsky's avatar Stefan Majewsky

Fix saving of deleted triggers.

svn path=/trunk/KDE/kdegames/palapeli/; revision=1118570
parent c919727f
...@@ -109,8 +109,11 @@ void Palapeli::TriggerMapper::setAssociations(const QMap<QByteArray, Palapeli::T ...@@ -109,8 +109,11 @@ void Palapeli::TriggerMapper::setAssociations(const QMap<QByteArray, Palapeli::T
for (; it1 != it2; ++it1) for (; it1 != it2; ++it1)
triggerSerializations[it1.key()] << it1.value().serialized(); triggerSerializations[it1.key()] << it1.value().serialized();
} }
//write config (in a way that supports multiple triggers for one interactor) //clear config
KConfigGroup group(KGlobal::config(), "Mouse Interaction"); KConfigGroup group(KGlobal::config(), "Mouse Interaction");
foreach (const QString& key, group.keyList())
group.deleteEntry(key);
//write config (in a way that supports multiple triggers for one interactor)
QMap<QByteArray, QList<QByteArray> >::const_iterator it1 = triggerSerializations.begin(), it2 = triggerSerializations.end(); QMap<QByteArray, QList<QByteArray> >::const_iterator it1 = triggerSerializations.begin(), it2 = triggerSerializations.end();
for (; it1 != it2; ++it1) for (; it1 != it2; ++it1)
group.writeEntry(it1.key().data(), it1.value()); group.writeEntry(it1.key().data(), it1.value());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment