Index: mttroot/mtt/bin/trans/dia2abg.pl ================================================================== --- mttroot/mtt/bin/trans/dia2abg.pl +++ mttroot/mtt/bin/trans/dia2abg.pl @@ -551,12 +551,12 @@ } die "There are no components!\n" unless keys(%component_id_tag) > 0; } sub parse_component_data { - my ($anon_index, $id, $component, $anonymous); - $anon_index = 0; + my (%anon_index, $id, $component, $anonymous); + while (($id, $component) = each (%component_id_tag)) { $_ = $component; id_cleaner(); $component = $_; my ($type_name, $repetitions) = split (/\*/, $component); @@ -565,13 +565,18 @@ $repetitions = 1; } my ($type, $name) = split (/:/, $type_name); if (! $name) { $type = $type_name; - $name = "mtt${type}_${anon_index}"; + if (! defined ($anon_index{$type})) { + $anon_index{$type} = 1; + } else { + $anon_index{$type}++; + } + my $num = $anon_index{$type}; + $name = "mtt${type}_${num}"; $anonymous = 1; - $anon_index++; } else { $anonymous = 0; } $component_id_type{$id} = $type; $component_id_name{$id} = $name;