Changeset 9a1f34d in sasview for src/sas/qtgui/Utilities
- Timestamp:
- Nov 15, 2018 8:07:32 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 3b0b17e
- Parents:
- 5f9e874 (diff), 67346f9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- src/sas/qtgui/Utilities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/GuiUtils.py
rb9ab979 r67346f9 151 151 DEFAULT_PERSPECTIVE = custom_config.DEFAULT_PERSPECTIVE 152 152 CLEANUP_PLOT = custom_config.CLEANUP_PLOT 153 SAS_OPENCL = custom_config.SAS_OPENCL 153 154 # custom open_path 154 155 open_folder = custom_config.DEFAULT_OPEN_FOLDER … … 171 172 CLEANUP_PLOT = False 172 173 DEFAULT_OPEN_FOLDER = PATH_APP 174 SAS_OPENCL = config.SAS_OPENCL 173 175 174 176 #DEFAULT_STYLE = config.DEFAULT_STYLE -
src/sas/qtgui/Utilities/ReportDialog.py
rcb90b65 r859d960 10 10 11 11 import sas.qtgui.Utilities.GuiUtils as GuiUtils 12 import sas.qtgui.Utilities.ObjectLibrary as ObjectLibrary 12 13 13 14 from sas.qtgui.Utilities.UI.ReportDialogUI import Ui_ReportDialogUI … … 27 28 28 29 self.data_html, self.data_txt, self.data_images = report_list 30 #self.save_location = None 31 #if 'ReportDialog_directory' in ObjectLibrary.listObjects(): 32 self.save_location = ObjectLibrary.getObject('ReportDialog_directory') 29 33 30 34 # Fill in the table from input data … … 70 74 """ 71 75 # Choose user's home directory 72 location = os.path.expanduser('~') 76 if self.save_location is None: 77 location = os.path.expanduser('~') 78 else: 79 location = self.save_location 73 80 # Use a sensible filename default 74 81 default_name = os.path.join(location, 'fit_report.pdf') … … 78 85 'caption' : 'Save Report', 79 86 # don't use 'directory' in order to remember the previous user choice 80 #'directory': default_name,87 'directory': default_name, 81 88 'filter' : 'PDF file (*.pdf);;HTML file (*.html);;Text file (*.txt)', 82 89 'options' : QtWidgets.QFileDialog.DontUseNativeDialog} … … 87 94 return 88 95 extension = filename_tuple[1] 96 self.save_location = os.path.dirname(filename) 97 # lifetime of this widget is short - keep the reference elsewhere 98 ObjectLibrary.addObject('ReportDialog_directory', self.save_location) 89 99 90 100 try:
Note: See TracChangeset
for help on using the changeset viewer.