#NEWLINE# def mode_cb( self , tf , modename ) : #NEWLINE# #INDENT# if ( self . active is None ) : #NEWLINE# #INDENT# ( self . active , bd ) = self . _get_view ( ) #NEWLINE# #UNINDENT# fitsimage = self . active #NEWLINE# if ( fitsimage is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# bm = fitsimage . get_bindmap ( ) #NEWLINE# if ( not tf ) : #NEWLINE# #INDENT# bm . reset_mode ( fitsimage ) #NEWLINE# return True #NEWLINE# #UNINDENT# bm . set_mode ( modename ) #NEWLINE# self . _update_toolbar_state ( fitsimage ) #NEWLINE# return True