#NEWLINE# def undo( self ) : #NEWLINE# #INDENT# '\n        Restore the old state of the user interface and dependency graph.\n        Rebuild the property widget if it was provided as well.\n        ' #NEWLINE# self . dag . restoreSnapshot ( self . oldSnap ) #NEWLINE# self . scene . restoreSnapshot ( self . oldSnap ) #NEWLINE# if self . propertyWidget : #NEWLINE# #INDENT# selectedDrawNodes = self . scene . selectedItems ( ) #NEWLINE# selectedDagNodes = [ sdn . dagNode for sdn in selectedDrawNodes ] #NEWLINE# self . propertyWidget . rebuild ( self . dag , selectedDagNodes )