mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-25 19:06:53 +00:00
Merge pull request #2467 from Capostrophic/stream
[Regression] Editor: Avoid locale-related settings parsing issues
This commit is contained in:
commit
3f2b63122d
1 changed files with 4 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
#include "intsetting.hpp"
|
#include "intsetting.hpp"
|
||||||
#include "doublesetting.hpp"
|
#include "doublesetting.hpp"
|
||||||
|
@ -415,7 +416,9 @@ CSMPrefs::DoubleSetting& CSMPrefs::State::declareDouble (const std::string& key,
|
||||||
if (mCurrentCategory==mCategories.end())
|
if (mCurrentCategory==mCategories.end())
|
||||||
throw std::logic_error ("no category for setting");
|
throw std::logic_error ("no category for setting");
|
||||||
|
|
||||||
setDefault(key, std::to_string(default_));
|
std::ostringstream stream;
|
||||||
|
stream << default_;
|
||||||
|
setDefault(key, stream.str());
|
||||||
|
|
||||||
default_ = mSettings.getFloat (key, mCurrentCategory->second.getKey());
|
default_ = mSettings.getFloat (key, mCurrentCategory->second.getKey());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue