mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-09 04:59:56 -06:00
Remove false matches while matching whole string
This commit is contained in:
@@ -120,6 +120,10 @@ void applyRegularExpression(lua_State* L, const std::string& regex,
|
||||
else if (!nodeName.empty() && id.find(nodeName) == std::string::npos) {
|
||||
continue;
|
||||
}
|
||||
// Match entire string
|
||||
else if (id != propertyName) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (type != prop->typeLua()) {
|
||||
LERRORC(
|
||||
@@ -490,6 +494,10 @@ int property_getProperty(lua_State* L) {
|
||||
else if (!nodeName.empty() && id.find(nodeName) == std::string::npos){
|
||||
continue;
|
||||
}
|
||||
// Match entire string
|
||||
else if (id != propertyName) {
|
||||
continue;
|
||||
}
|
||||
|
||||
res.push_back(id);
|
||||
}
|
||||
@@ -646,6 +654,10 @@ int removeSceneGraphNodesFromRegex(lua_State* L) {
|
||||
if (!nodeName.empty() && identifier.find(nodeName) == std::string::npos) {
|
||||
continue;
|
||||
}
|
||||
// Match entire string
|
||||
else if (identifier != propertyName) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foundMatch = true;
|
||||
SceneGraphNode* parent = node->parent();
|
||||
|
||||
Reference in New Issue
Block a user