only allow saving setPropertyValue to profiles

This commit is contained in:
Micah Acinapura
2019-09-16 15:37:33 -04:00
parent 2a75a88195
commit 8864620367
+6
View File
@@ -399,6 +399,12 @@ int saveLastChangeToProfile(lua_State* L) {
lastLine=line;
}
if (actualLastLine.find("openspace.setPropertyValue") == std::string::npos) {
ghoul::lua::push(L, "Only property value changes can be saved.");
printInternal(ghoul::logging::LogLevel::Error, L);
return -1;
}
std::string dataString = "${ASSETS}/";
std::string assetPath = absPath(fmt::format("{}{}.scene", dataString, asset));
std::string tempAssetPath = absPath(fmt::format("{}{}.scene.tmp", dataString, asset));