} else {
require LaTeX::TikZ::Set::Sequence;
$set->_set(LaTeX::TikZ::Set::Sequence->new(
- kids => $kid,
+ kids => [ $kid, @_ ],
));
}
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;
}