소스 검색

updated delete_node so that attributes are unset first

tpinna 10 년 전
부모
커밋
962b29fa81
1개의 변경된 파일과 6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      bootstrap/modelling.alc

+ 6 - 0
bootstrap/modelling.alc

@@ -169,6 +169,12 @@ Void function define_inheritance(model : Element, inheritance_name : String):
 	return
 
 Void function model_delete_element(model : Element, name : String):
+	//first unset attributes
+	Element attributelist
+	attributelist = dict_keys(getAttributeList(model, name))
+	while (integer_lt(0, read_nr_out(attributelist))):
+		unset_attribute(model, name, set_pop(attributelist))
+	
 	// Remove the link
 	// 1) from the type mapping
 	dict_delete(model["type_mapping"], model["model"][name])