Changeset 685602a in sasview for src/sas/qtgui/Perspectives/Fitting


Ignore:
Timestamp:
Sep 8, 2018 11:11:08 AM (6 years ago)
Author:
Laura Forster <Awork@…>
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:
5b144c6
Parents:
5e0891b
Message:

Problem when copying multiplicy models caused crash

crashed when multiplicy model was selected eg spherical sld, because there was a drop down box instead of high/low like it was expecting.
there are is now error handling for this but it does not copy and paste the drop down box selection which will need to be implimented seperately.
When GUI loaded Paste is now disabled until user copies params. Paste also checks if model has changed since last copy, and displays message warning user that not all params may paste, with option to cancel. Also - focus fixed such that if paste is clicked the params automatically update without having to move mouse to reset the focus.

File:
1 edited

Legend:

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

    r5e0891b r685602a  
    31253125            param_value = str(self._model_model.item(row, 1).text()) 
    31263126            param_error = None 
     3127            param_min = None 
     3128            param_max = None 
    31273129            column_offset = 0 
    31283130            if self.has_error_column: 
    31293131                param_error = str(self._model_model.item(row, 2).text()) 
    31303132                column_offset = 1 
    3131             param_min = str(self._model_model.item(row, 2+column_offset).text()) 
    3132             param_max = str(self._model_model.item(row, 3+column_offset).text()) 
     3133 
     3134            try: 
     3135                param_min = str(self._model_model.item(row, 2+column_offset).text()) 
     3136                param_max = str(self._model_model.item(row, 3+column_offset).text()) 
     3137            except: 
     3138                pass 
     3139 
    31333140            param_list.append([param_name, param_checked, param_value, param_error, param_min, param_max]) 
    31343141 
     
    32203227 
    32213228                # limits 
    3222                 limit_lo = item[3] 
    3223                 context[name].append(limit_lo) 
    3224                 limit_hi = item[4] 
    3225                 context[name].append(limit_hi) 
     3229                try: 
     3230                    limit_lo = item[3] 
     3231                    context[name].append(limit_lo) 
     3232                    limit_hi = item[4] 
     3233                    context[name].append(limit_hi) 
     3234                except: 
     3235                    pass 
    32263236 
    32273237                # Polydisp 
     
    32823292                ioffset = 1 
    32833293            # min/max 
    3284             param_repr = GuiUtils.formatNumber(param_dict[param_name][2+ioffset], high=True) 
    3285             self._model_model.item(row, 2+ioffset).setText(param_repr) 
    3286             param_repr = GuiUtils.formatNumber(param_dict[param_name][3+ioffset], high=True) 
    3287             self._model_model.item(row, 3+ioffset).setText(param_repr) 
     3294            try: 
     3295                param_repr = GuiUtils.formatNumber(param_dict[param_name][2+ioffset], high=True) 
     3296                self._model_model.item(row, 2+ioffset).setText(param_repr) 
     3297                param_repr = GuiUtils.formatNumber(param_dict[param_name][3+ioffset], high=True) 
     3298                self._model_model.item(row, 3+ioffset).setText(param_repr) 
     3299            except: 
     3300                pass 
     3301 
    32883302            self.setFocus() 
     3303 
    32893304 
    32903305 
Note: See TracChangeset for help on using the changeset viewer.