From: Vincent Pit Date: Fri, 26 Nov 2010 13:43:58 +0000 (+0100) Subject: Simplify the layer application logic X-Git-Tag: rt87282~23 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=1ace068a681d0dea45c546bb6509586212adec98;p=perl%2Fmodules%2FLaTeX-TikZ.git Simplify the layer application logic --- diff --git a/lib/LaTeX/TikZ/Scope.pm b/lib/LaTeX/TikZ/Scope.pm index 8edad60..d8ce861 100644 --- a/lib/LaTeX/TikZ/Scope.pm +++ b/lib/LaTeX/TikZ/Scope.pm @@ -219,20 +219,12 @@ sub fold { ); my $has_different_layers; - for (@$only_left) { + for (@$only_left, @$only_right) { if ($_->type eq 'layer') { $has_different_layers = 1; last; } } - unless ($has_different_layers) { - for (@$only_right) { - if ($_->type eq 'layer') { - $has_different_layers = 1; - last; - } - } - } if (!$has_different_layers and @$common) { my $x = $left->new