#NEWLINE# def updateVersion( self ) : #NEWLINE# #INDENT# self . pe = None #NEWLINE# if self . controller : #NEWLINE# #INDENT# version_changed = False #NEWLINE# if ( self . controller . current_parameter_exploration and ( self . controller . current_parameter_exploration . action_id != self . controller . current_version ) ) : #NEWLINE# #INDENT# version_changed = True #NEWLINE# self . controller . current_parameter_exploration = None #NEWLINE# #UNINDENT# if ( ( not self . controller . current_parameter_exploration ) and self . controller . vistrail . has_paramexp ( self . controller . current_version ) ) : #NEWLINE# #INDENT# version_changed = True #NEWLINE# self . controller . current_parameter_exploration = self . controller . vistrail . get_paramexp ( self . controller . current_version ) #NEWLINE# #UNINDENT# if version_changed : #NEWLINE# #INDENT# from vistrails.gui.vistrails_window import _app #NEWLINE# _app . notify ( 'exploration_changed' ) #NEWLINE# return #NEWLINE# #UNINDENT# self . pe = self . controller . current_parameter_exploration #NEWLINE# #UNINDENT# if ( self . controller and self . pe ) : #NEWLINE# #INDENT# self . peDict = dict ( [ ( pe . id , pe ) for pe in self . controller . vistrail . parameter_explorations if ( pe . action_id == self . pe . action_id ) ] ) #NEWLINE# count = len ( self . peDict ) #NEWLINE# ids = self . peDict . keys ( ) #NEWLINE# ids . sort ( ) #NEWLINE# index = ( ids . index ( self . pe . id ) + 1 ) #NEWLINE# text = ( 'Exploration: %s/%s' % ( index , count ) ) #NEWLINE# self . versionsLabel . setText ( text ) #NEWLINE# self . backAction . setEnabled ( ( index > 1 ) ) #NEWLINE# self . forwardAction . setEnabled ( ( index < count ) ) #NEWLINE# self . tagEdit . setEnabled ( True ) #NEWLINE# self . tagReset . setEnabled ( True ) #NEWLINE# self . tagEdit . setText ( ( self . pe . name or '' ) ) #NEWLINE# self . userEdit . setText ( ( self . pe . user or '' ) ) #NEWLINE# self . dateEdit . setText ( ( self . pe . date . strftime ( '%Y-%m-%d %H:%M:%S' ) if self . pe . date else '' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . versionsLabel . setText ( 'Exploration: 0/0' ) #NEWLINE# self . backAction . setEnabled ( False ) #NEWLINE# self . forwardAction . setEnabled ( False ) #NEWLINE# self . tagEdit . setEnabled ( False ) #NEWLINE# self . tagReset . setEnabled ( False ) #NEWLINE# self . tagEdit . setText ( '' ) #NEWLINE# self . userEdit . setText ( '' ) #NEWLINE# self . dateEdit . setText ( '' )