#NEWLINE# def __textChanged( self , textWidget ) : #NEWLINE# #INDENT# assert ( textWidget is self . __textWidget ) #NEWLINE# if self . _editable ( ) : #NEWLINE# #INDENT# text = self . __textWidget . getText ( ) #NEWLINE# with Gaffer . UndoContext ( self . getPlug ( ) . ancestor ( Gaffer . ScriptNode ) ) : #NEWLINE# #INDENT# self . getPlug ( ) . setValue ( textWidget ) #NEWLINE# #UNINDENT# self . __textWidget . clearUndo ( )