Ignore:
Timestamp:
Mar 1, 2018 8:02:28 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
e4c475b7
Parents:
fde5bcd
Message:

Chain fitting for constraint batch fitting

File:
1 edited

Legend:

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

    rc736154 r91ad45c  
    3232        self.page_id = 301 
    3333 
     34        # Are we chain fitting? 
     35        self.is_chain_fitting = False 
     36 
    3437        # Remember previous content of modified cell 
    3538        self.current_cell = "" 
     
    6669        self.tblTabList.customContextMenuRequested.connect(self.showModelContextMenu) 
    6770 
     71        # Single Fit is the default, so disable chainfit 
     72        self.chkChain.setVisible(False) 
     73 
    6874        # disabled constraint  
    6975        labels = ['Constraint'] 
     
    8692        self.cmdFit.clicked.connect(self.onFit) 
    8793        self.cmdHelp.clicked.connect(self.onHelp) 
     94        self.chkChain.toggled.connect(self.onChainFit) 
    8895 
    8996        # QTableWidgets 
     
    117124        source = self.sender().objectName() 
    118125        self.currentType = "BatchPage" if source == "btnBatch" else "FitPage" 
     126        self.chkChain.setVisible(source=="btnBatch") 
    119127        self.initializeFitList() 
    120128 
     
    130138        """ 
    131139        return [tab for tab in self.tabs_for_fitting if self.tabs_for_fitting[tab]] 
     140 
     141    def onChainFit(self, is_checked): 
     142        """ 
     143        Respond to selecting the Chain Fit checkbox 
     144        """ 
     145        self.is_chain_fitting = is_checked 
    132146 
    133147    def onFit(self): 
     
    192206                             page_id=page_ids, 
    193207                             updatefn=updater, 
    194                              completefn=completefn) 
     208                             completefn=completefn, 
     209                             reset_flag=self.is_chain_fitting) 
    195210 
    196211        if LocalConfig.USING_TWISTED: 
     
    370385        object = ObjectLibrary.getObject(tab) 
    371386        if not isinstance(object, FittingWidget): return False 
    372         if object.data is None: return False 
     387        if not object.data_is_loaded : return False 
    373388        return True 
    374389 
Note: See TracChangeset for help on using the changeset viewer.