X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FSet%2FMod.pm;h=f759b0de3ac1d805050440788d756fe1c3225185;hb=aba26c835113a0332c5480e99f86bfa67111de84;hp=e98b98aecd579c4ada5ccaa10c52d355307f8927;hpb=168a73df452b234d431ca830d3eb937bf89348ec;p=perl%2Fmodules%2FLaTeX-TikZ.git diff --git a/lib/LaTeX/TikZ/Set/Mod.pm b/lib/LaTeX/TikZ/Set/Mod.pm index e98b98a..f759b0d 100644 --- a/lib/LaTeX/TikZ/Set/Mod.pm +++ b/lib/LaTeX/TikZ/Set/Mod.pm @@ -88,14 +88,10 @@ MOD: for my $mod ($set->mods) { $has_layer = 1 if $ltml_tc->check($mod); my $tag = $mod->tag; - my @candidates; - if (defined $tag) { - my $old = $mods{$tag}; - @candidates = $old ? map $_->[0], @$old : (); - } else { - @candidates = values %mods; + my $old = $mods{$tag} || []; + for (@$old) { + next MOD if $_->[0]->cover($mod); } - $_->cover($mod) and next MOD for @candidates; push @{$mods{$tag}}, [ $mod, $last_mod++ ]; push @mods, $mod; }