File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -606,10 +606,14 @@ def images_loaded(self, enabled=True):
606606 def on_action_open_materials_triggered (self ):
607607 selected_file , selected_filter = QFileDialog .getOpenFileName (
608608 self .ui , 'Load Materials File' , HexrdConfig ().working_dir ,
609- 'HDF5 files (*.h5 *.hdf5)' )
609+ 'HDF5 files (*.h5 *.hdf5), CIF (*.cif)' )
610+ if not selected_file :
611+ return
610612
611- if selected_file :
612- HexrdConfig ().working_dir = os .path .dirname (selected_file )
613+ HexrdConfig ().working_dir = os .path .dirname (selected_file )
614+ if Path (selected_file ).suffix == '.cif' :
615+ HexrdConfig ().import_material (selected_file )
616+ else :
613617 HexrdConfig ().load_materials (selected_file )
614618
615619 def on_action_save_imageseries_triggered (self ):
You can’t perform that action at this time.
0 commit comments