fixes 0003518: Expressions (fx) not updated
This commit is contained in:
@@ -80,6 +80,24 @@ protected:
|
||||
it->second = jt->second;
|
||||
}
|
||||
}
|
||||
// update the expression if name of the object is used
|
||||
else if (LocalName == "Expression") {
|
||||
std::map<std::string, std::string>::iterator it = AttrMap.find("expression");
|
||||
if (it != AttrMap.end()) {
|
||||
// search for the part before the first dot that should be the object name.
|
||||
std::string expression = it->second;
|
||||
std::string::size_type dotpos = expression.find_first_of(".");
|
||||
if (dotpos != std::string::npos) {
|
||||
std::string name = expression.substr(0, dotpos);
|
||||
std::map<std::string, std::string>::const_iterator jt = nameMap.find(name);
|
||||
if (jt != nameMap.end()) {
|
||||
std::string newexpression = jt->second;
|
||||
newexpression += expression.substr(dotpos);
|
||||
it->second = newexpression;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,6 +80,24 @@ protected:
|
||||
it->second = jt->second;
|
||||
}
|
||||
}
|
||||
// update the expression if name of the object is used
|
||||
else if (LocalName == "Expression") {
|
||||
std::map<std::string, std::string>::iterator it = AttrMap.find("expression");
|
||||
if (it != AttrMap.end()) {
|
||||
// search for the part before the first dot that should be the object name.
|
||||
std::string expression = it->second;
|
||||
std::string::size_type dotpos = expression.find_first_of(".");
|
||||
if (dotpos != std::string::npos) {
|
||||
std::string name = expression.substr(0, dotpos);
|
||||
std::map<std::string, std::string>::const_iterator jt = nameMap.find(name);
|
||||
if (jt != nameMap.end()) {
|
||||
std::string newexpression = jt->second;
|
||||
newexpression += expression.substr(dotpos);
|
||||
it->second = newexpression;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user