8000 MNT: make set_animated smarter · matplotlib/matplotlib@a5f5ab5 · GitHub
[go: up one dir, main page]

Skip to content

Commit a5f5ab5

Browse files
committed
MNT: make set_animated smarter
- short circuit if not really chaning state - don't fire stale trigger on changing animation state
1 parent 83ea020 commit a5f5ab5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/artist.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -814,9 +814,9 @@ def set_animated(self, b):
814814
815815
ACCEPTS: [True | False]
816816
"""
817-
self._animated = b
818-
self.pchanged()
819-
self.stale = True
817+
if self._animated != b:
818+
self._animated = b
819+
self.pchanged()
820820

821821
def update(self, props):
822822
"""

0 commit comments

Comments
 (0)
0