Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

fix registry setup (#1457)

shun-iwasawaacd6b875b579
diff --git a/toonz/sources/common/tapptools/tenv.cpp b/toonz/sources/common/tapptools/tenv.cpp
index 90a981c6b..e4c008e61 100644
--- a/toonz/sources/common/tapptools/tenv.cpp
+++ b/toonz/sources/common/tapptools/tenv.cpp
@@ -49,9 +49,7 @@ class EnvGlobals { // singleton
TFilePath *m_dllRelativeDir;
bool m_isPortable = false;
- EnvGlobals() : m_stuffDir(0) {
- setWorkingDirectory();
- }
+ EnvGlobals() : m_stuffDir(0) { setWorkingDirectory(); }
public:
~EnvGlobals() { delete m_stuffDir; }
@@ -188,7 +186,10 @@ public:
}
std::string getRootVarName() { return m_rootVarName; }
- void setSystemVarPrefix(std::string prefix) { m_systemVarPrefix = prefix; }
+ void setSystemVarPrefix(std::string prefix) {
+ m_systemVarPrefix = prefix;
+ updateEnvFile();
+ }
std::string getSystemVarPrefix() {
if (getIsPortable()) return "";
return m_systemVarPrefix;