]> git.vpit.fr Git - perl/modules/LaTeX-TikZ.git/commitdiff
Simplify the layer application logic
authorVincent Pit <vince@profvince.com>
Fri, 26 Nov 2010 13:43:58 +0000 (14:43 +0100)
committerVincent Pit <vince@profvince.com>
Fri, 26 Nov 2010 13:43:58 +0000 (14:43 +0100)
lib/LaTeX/TikZ/Scope.pm

index 8edad60f9d67019ebe1149ba72b06d603faf812e..d8ce86183abfde264ab100125983fc7873a3b34e 100644 (file)
@@ -219,20 +219,12 @@ sub fold {
    );
 
    my $has_different_layers;
    );
 
    my $has_different_layers;
-   for (@$only_left) {
+   for (@$only_left, @$only_right) {
     if ($_->type eq 'layer') {
      $has_different_layers = 1;
      last;
     }
    }
     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
 
    if (!$has_different_layers and @$common) {
     my $x = $left->new