

itemsChangedListeners except AttributeError : # It's possible that the attribute was already collected when the itemChange happened # (if it was triggered during the gc of the object). itemChange ( self, change, value ) if change in : try : itemsChangedListeners = self. _GraphicsObject_inform_view_on_change = False def itemChange ( self, change, value ): ret = ItemGroup. itemsChangedListeners = WeakList () # exempt from telling view when transform changes self. # Note 2: We might also like to use a signal rather than this callback # mechanism, but this causes a different PySide crash. # Note 1: We would prefer to override itemChange directly on the # ViewBox, but this causes crashes on PySide. _init_ ( self, parent ) # Used as callback to inform ViewBox when items are added/removed from # the group. _items else : yield d i -= 1 class ChildGroup ( ItemGroup ): def _init_ ( self, parent ): ItemGroup.

_items d = ref () if d is None : del self. ref ( obj )) def _iter_ ( self ): i = len ( self. _items = def append ( self, obj ): #Add backwards to iterate backwards (to make iterating more efficient on removal). ItemGroup import ItemGroup _all_ = class WeakList ( object ): def _init_ ( self ): self. GraphicsWidget import GraphicsWidget from.

Qt import QtCore, QtGui, QtWidgets, isQObjectAlive from. Import math import sys import weakref from copy import deepcopy import numpy as np from.
