Changeset 8ac8717 in sasview for src/sas


Ignore:
Timestamp:
Oct 4, 2018 7:46:49 AM (6 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
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:
658795d
Parents:
37b34a3
Message:

Patch for the new style of magnetic parameter display. Ticket 1189

File:
1 edited

Legend:

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

    ra486918 r8ac8717  
    30063006        Wrapper for model update with a subset of magnetic parameters 
    30073007        """ 
    3008         if param.name[param.name.index(':')+1:] in self.shell_names: 
    3009             # check if two-digit shell number 
     3008        try: 
     3009            basename, _ = param.name.rsplit('_', 1) 
     3010        except ValueError: 
     3011            basename = param.name 
     3012        if basename in self.shell_names: 
    30103013            try: 
    3011                 shell_index = int(param.name[-2:]) 
     3014                shell_index = int(basename[-2:]) 
    30123015            except ValueError: 
    3013                 shell_index = int(param.name[-1:]) 
     3016                shell_index = int(basename[-1:]) 
    30143017 
    30153018            if shell_index > self.current_shell_displayed: 
Note: See TracChangeset for help on using the changeset viewer.