public void RemoveAttributeInfo(int id)
{
string toDelete = "";
foreach (KeyValuePair<string, PssgAttribute> pair in attributes)
{
if (pair.Value.id == id)
{
toDelete = pair.Key;
}
else if (pair.Value.id > id)
{
pair.Value.id--;
}
}
if (attributes.ContainsKey(toDelete) == true)
{
attributes.Remove(toDelete);
}
if (subNodes != null)
{
foreach (PssgNode subNode in subNodes)
{
subNode.RemoveAttributeInfo(id);
}
}
}