mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-25 22:10:41 -04:00
[Regression] Avoid locale-related conversion issues in editor
This commit is contained in:
parent
cad4ba0423
commit
5341ca4e22
@ -3,6 +3,7 @@
|
||||
|
||||
#include <stdexcept>
|
||||
#include <algorithm>
|
||||
#include <sstream>
|
||||
|
||||
#include "intsetting.hpp"
|
||||
#include "doublesetting.hpp"
|
||||
@ -415,7 +416,9 @@ CSMPrefs::DoubleSetting& CSMPrefs::State::declareDouble (const std::string& key,
|
||||
if (mCurrentCategory==mCategories.end())
|
||||
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());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user