B #1777: When a RA is removed it is added to the tmp template to

preserve it after merges/replaces

(cherry picked from commit 7d56427061)
This commit is contained in:
Ruben S. Montero committed 2018-03-23 18:08:49 +01:00
1 parent b6f1ea1804
commit da326485e6
1 file changed
+13 -2
+13 -2
View File
@@ -730,10 +730,17 @@ bool Template::check_restricted(string& ra, const Template* base,
}
else
{
// +---------+--------+--------------------+
// | current | base | outcome |
// +---------+--------+--------------------+
// | YES | YES/NO | Error if different |
// | NO | YES | Add to current |
// | NO | NO | Nop |
// +---------+--------+--------------------+
string ra_b;
if ( get(rit->first, ra) )
{
string ra_b;
base->get(rit->first, ra_b);
if ( ra_b != ra )
@@ -742,6 +749,10 @@ bool Template::check_restricted(string& ra, const Template* base,
return true;
}
}
else if ( base->get(rit->first, ra_b) )
{
add(rit->first, ra_b);
}
}
}