Changeset 0764593 in sasview


Ignore:
Timestamp:
Jan 23, 2018 2:20:45 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:
eb1a386
Parents:
ba01ad1
Message:

Minor fixes to the complex constraint widget

Location:
src/sas/qtgui/Perspectives/Fitting
Files:
2 edited

Legend:

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

    • Property mode changed from 100755 to 100644
    rba01ad1 r0764593  
    6666        self.txtName2.setText(self.tab_names[1]) 
    6767 
     68        # Show only parameters not already constrained 
    6869        self.cbParam1.clear() 
    69         self.cbParam1.addItems(self.params[0]) 
     70        items = [param for i,param in enumerate(self.params[0]) if not self.tabs[0].rowHasConstraint(i)] 
     71        self.cbParam1.addItems(items) 
    7072        self.cbParam2.clear() 
    71         self.cbParam2.addItems(self.params[1]) 
     73        items = [param for i,param in enumerate(self.params[1]) if not self.tabs[1].rowHasConstraint(i)] 
     74        self.cbParam2.addItems(items) 
    7275 
    7376        self.txtParam.setText(self.tab_names[0] + ":" + self.cbParam1.currentText()) 
     
    112115        self.params[1], self.params[0] = self.params[0], self.params[1] 
    113116        self.tab_names[1], self.tab_names[0] = self.tab_names[0], self.tab_names[1] 
     117        self.tabs[1], self.tabs[0] = self.tabs[0], self.tabs[1] 
    114118        # Try to swap parameter names in the line edit 
    115119        current_text = self.txtConstraint.text() 
  • src/sas/qtgui/Perspectives/Fitting/ConstraintWidget.py

    rba01ad1 r0764593  
    141141        # but let's just assure it post-factum 
    142142        is_good_moniker = self.validateMoniker(new_moniker) 
    143         is_good_moniker = True 
    144143        if not is_good_moniker: 
    145144            item.setBackground(QtCore.Qt.red) 
     
    163162        # Replace constraint name 
    164163        temp_tab.replaceConstraintName(self.current_cell, new_moniker) 
     164        # Replace constraint name in the remaining tabs 
     165        for tab in self.available_tabs.values(): 
     166            tab.replaceConstraintName(self.current_cell, new_moniker) 
    165167        # Reinitialize the display 
    166168        self.initializeFitList() 
Note: See TracChangeset for help on using the changeset viewer.