From: Vincent Pit Date: Wed, 22 Apr 2015 19:43:11 +0000 (-0300) Subject: Don't overwrite an ancestor functor rule X-Git-Tag: v0.03~7 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=cfe1f7a0b769c771181f2cb0d3d8f16a1dac7ad7;p=perl%2Fmodules%2FLaTeX-TikZ.git Don't overwrite an ancestor functor rule If A was an ancestor of B, and both A and B declared rules, then the rule for A used to be replaced by the one for A instead of being pushed further away in the rule list. --- diff --git a/lib/LaTeX/TikZ/Functor/Rule.pm b/lib/LaTeX/TikZ/Functor/Rule.pm index 8cebab1..88e30db 100644 --- a/lib/LaTeX/TikZ/Functor/Rule.pm +++ b/lib/LaTeX/TikZ/Functor/Rule.pm @@ -196,7 +196,7 @@ sub insert { } if (defined $pos) { - splice @$list, $pos, 1, $rule; + splice @$list, $pos, 0, $rule; return 0; } }