Changeset b799f09 in sasview
- Timestamp:
- Jul 9, 2018 3:01:20 PM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
- Children:
- ac38ab4
- Parents:
- fc51d06
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/gui_manager.py
reb6abab rb799f09 2567 2567 """ 2568 2568 default_name = fname 2569 wildcard = "IGOR/DAT 2D file in Q_map (*.dat)|*.DAT" 2569 wildcard = "IGOR/DAT 2D file in Q_map (*.dat)|*.DAT|"\ 2570 "NXcanSAS files (*.h5)|*.h5|" 2570 2571 dlg = wx.FileDialog(self, "Choose a file", 2571 2572 self._default_save_location, … … 2579 2580 if ext_num == 0: 2580 2581 ext_format = '.dat' 2582 elif ext_num == 1: 2583 ext_format = '.h5' 2581 2584 else: 2582 2585 ext_format = '' … … 2586 2589 # Instantiate a loader 2587 2590 loader = Loader() 2588 2589 ext_format = ".dat" 2590 if os.path.splitext(mypath)[1].lower() == ext_format: 2591 if os.path.splitext(mypath)[1].lower() == '.dat': 2591 2592 # Make sure the ext included in the file name 2592 2593 # especially on MAC 2593 2594 fileName = os.path.splitext(path)[0] + ext_format 2594 2595 loader.save(fileName, data, ext_format) 2596 elif os.path.splitext(mypath)[1].lower() == '.h5': 2597 # Make sure the ext included in the file name 2598 # especially on MAC 2599 fileName = os.path.splitext(path)[0] + ext_format 2600 nxcansaswriter = NXcanSASWriter() 2601 nxcansaswriter.write([data], fileName) 2595 2602 try: 2596 2603 self._default_save_location = os.path.dirname(path)
Note: See TracChangeset
for help on using the changeset viewer.