Skip to content

Commit

Permalink
PropertyExpressionEngine: Fixed bug in Copy and Paste (make deep copi…
Browse files Browse the repository at this point in the history
…es of the expressions).
  • Loading branch information
eivindkv authored and wwmayer committed Feb 18, 2016
1 parent 9606fb1 commit 727a066
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/App/PropertyExpressionEngine.cpp
Expand Up @@ -110,7 +110,7 @@ Property *PropertyExpressionEngine::Copy() const
PropertyExpressionEngine * engine = new PropertyExpressionEngine();

for (ExpressionMap::const_iterator it = expressions.begin(); it != expressions.end(); ++it)
engine->expressions[it->first] = ExpressionInfo(it->second);
engine->expressions[it->first] = ExpressionInfo(boost::shared_ptr<Expression>(it->second.expression->copy()), it->second.comment.c_str());

engine->validator = validator;

Expand All @@ -125,7 +125,7 @@ void PropertyExpressionEngine::Paste(const Property &from)
expressions.clear();

for (ExpressionMap::const_iterator it = fromee->expressions.begin(); it != fromee->expressions.end(); ++it) {
expressions[it->first] = ExpressionInfo(it->second);
expressions[it->first] = ExpressionInfo(boost::shared_ptr<Expression>(it->second.expression->copy()), it->second.comment.c_str());
expressionChanged(it->first);
}

Expand Down

0 comments on commit 727a066

Please sign in to comment.