added category update function

openmw-38
Marc Zinnschlag 9 years ago
parent 3a5238bebc
commit 04a11679fb

@ -4,6 +4,7 @@
#include <stdexcept>
#include "setting.hpp"
#include "state.hpp"
CSMPrefs::Category::Category (State *parent, const std::string& key)
: mParent (parent), mKey (key)
@ -42,3 +43,9 @@ CSMPrefs::Setting& CSMPrefs::Category::operator[] (const std::string& key)
throw std::logic_error ("Invalid user setting: " + key);
}
void CSMPrefs::Category::update()
{
for (Iterator iter = mSettings.begin(); iter!=mSettings.end(); ++iter)
mParent->update (**iter);
}

@ -37,6 +37,8 @@ namespace CSMPrefs
Iterator end();
Setting& operator[] (const std::string& key);
void update();
};
}

Loading…
Cancel
Save