Kaynağa Gözat

updated delete_node so that attributes are unset first

tpinna 10 yıl önce
ebeveyn
işleme
962b29fa81
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  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])