Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8fa0f35

Browse filesBrowse files
committed
Merge pull request #2418 from mdboom/pdf-parent-check
AssertionError with quiver, quiverkey, and an additional patch.
2 parents c9dd094 + aeef93a commit 8fa0f35
Copy full SHA for 8fa0f35

File tree

Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed

‎lib/matplotlib/backends/backend_pdf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pdf.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,11 +2139,12 @@ def clip_cmd(self, cliprect, clippath):
21392139
"""Set clip rectangle. Calls self.pop() and self.push()."""
21402140
cmds = []
21412141
# Pop graphics state until we hit the right one or the stack is empty
2142-
while (self._cliprect, self._clippath) != (cliprect, clippath) \
2143-
and self.parent is not None:
2142+
while ((self._cliprect, self._clippath) != (cliprect, clippath)
2143+
and self.parent is not None):
21442144
cmds.extend(self.pop())
21452145
# Unless we hit the right one, set the clip polygon
2146-
if (self._cliprect, self._clippath) != (cliprect, clippath):
2146+
if ((self._cliprect, self._clippath) != (cliprect, clippath) or
2147+
self.parent is None):
21472148
cmds.extend(self.push())
21482149
if self._cliprect != cliprect:
21492150
cmds.extend([cliprect, Op.rectangle, Op.clip, Op.endpath])

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.