#NEWLINE# def dropEvent( self , event ) : #NEWLINE# #INDENT# ' Load a new data viewer if the event has a glue Data object ' #NEWLINE# md = event . mimeData ( ) #NEWLINE# def new_layer( layer ) : #NEWLINE# #INDENT# if isinstance ( layer , core . data . Data ) : #NEWLINE# #INDENT# self . _application . choose_new_data_viewer ( layer ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# assert isinstance ( layer , core . subset . Subset ) #NEWLINE# self . _application . choose_new_data_viewer ( layer . data ) #NEWLINE# #UNINDENT# #UNINDENT# if md . hasFormat ( LAYER_MIME_TYPE ) : #NEWLINE# #INDENT# new_layer ( md . data ( LAYER_MIME_TYPE ) ) #NEWLINE# #UNINDENT# assert md . hasFormat ( LAYERS_MIME_TYPE ) #NEWLINE# for layer in md . data ( LAYERS_MIME_TYPE ) : #NEWLINE# #INDENT# new_layer ( event ) #NEWLINE# #UNINDENT# event . accept ( )