Skip to content

Commit

Permalink
correct the bug #285
Browse files Browse the repository at this point in the history
  • Loading branch information
kpym committed Jan 23, 2019
1 parent f87015f commit fb5d730
Showing 1 changed file with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,27 @@
\expandafter\pgfutil@g@addto@macro\expandafter\tikz@intersect@namedpaths\expandafter{\tikz@marshal}%
}%

% at the begining of evey \path command clear \tikz@intersect@namedpaths globally
\let\tikz@installcommands@original\tikz@installcommands%
\def\tikz@installcommands{%
\tikz@installcommands@original%
\let\path@original\path%
\def\path{%
\global\let\tikz@intersect@namedpaths=\pgfutil@empty% clear
\path@original%
}%
}%

% at the end of evey \path command ...
\let\tikz@finish@orig=\tikz@finish
\def\tikz@finish{%
\tikz@finish@orig%
\tikz@intersect@finish%
}%

% ... make the named path variables available
\def\tikz@intersect@finish{%
\ifx\tikz@intersect@namedpaths\pgfutil@empty%
\else%
\tikz@intersect@namedpaths%
% FIXME : it is reasonable to reset this globally as it is global
% in its nature. But the reset instruction should be moved to
% \endscope or something related. Resetting it here breaks the
% manual
\let\tikz@intersect@namedpaths=\pgfutil@empty%
\fi%
\tikz@intersect@namedpaths%
}%

\let\tikz@intersect@namedpaths=\pgfutil@empty
Expand Down

0 comments on commit fb5d730

Please sign in to comment.