Ignore:
Timestamp:
Aug 22, 2018 7:00:00 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
b7f7d3f
Parents:
0d8b2db
Message:

Several fixes for runtime errors. SASVIEW-988.
Failures in Algorithm Option dialog
Q Ranges not showing properly with charts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingOptions.py

    raed0532 rf7d39c9  
    146146            """ 
    147147            widget = self.widgetFromOption(option) 
    148             new_value = widget.currentText() if isinstance(widget, QtWidgets.QComboBox) \ 
    149                 else float(widget.text()) 
    150             self.config.values[self.current_fitter_id][option] = new_value 
     148            if widget is None: 
     149                return 
     150            try: 
     151                new_value = widget.currentText() if isinstance(widget, QtWidgets.QComboBox) \ 
     152                    else float(widget.text()) 
     153                self.config.values[self.current_fitter_id][option] = new_value 
     154            except ValueError: 
     155                # Don't update bumps if widget has bad data 
     156                self.reject 
    151157 
    152158        # Update the BUMPS singleton 
Note: See TracChangeset for help on using the changeset viewer.