Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b7324b2

Browse files
authored
Merge pull request #25291 from anntzer/cgtii
Limit full-invalidation of CompositeGenericTransforms.
2 parents 5a34696 + f226488 commit b7324b2

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/matplotlib/transforms.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,14 +2357,9 @@ def frozen(self):
23572357
return frozen
23582358

23592359
def _invalidate_internal(self, level, invalidating_node):
2360-
# In some cases for a composite transform, an invalidating call to
2361-
# AFFINE_ONLY needs to be extended to invalidate the NON_AFFINE part
2362-
# too. These cases are when the right hand transform is non-affine and
2363-
# either:
2364-
# (a) the left hand transform is non affine
2365-
# (b) it is the left hand node which has triggered the invalidation
2366-
if (not self._b.is_affine and
2367-
(not self._a.is_affine or invalidating_node is self._a)):
2360+
# When the left child is invalidated at AFFINE_ONLY level and the right child is
2361+
# non-affine, the composite transform is FULLY invalidated.
2362+
if invalidating_node is self._a and not self._b.is_affine:
23682363
level = Transform._INVALID_FULL
23692364
super()._invalidate_internal(level, invalidating_node)
23702365

0 commit comments

Comments
 (0)