Changeset 7f41584 in sasview


Ignore:
Timestamp:
Nov 21, 2018 5:21:11 AM (3 weeks ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Invariant, ESS_GUI_batch_fitting, ESS_GUI_ordering
Children:
ba400d1
Parents:
c30822c
Message:

Fix minor formatting/display issues with parameters. SASVIEW-1191

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

Legend:

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

    r65759c7 r7f41584  
    368368            cbox = createFixedChoiceComboBox(par, row) 
    369369 
     370            # Apply combobox if required 
     371            if None not in (view, cbox): 
     372                # set the min/max cell to be empty 
     373                item3.setText("") 
     374                item4.setText("") 
     375 
    370376            # Always add to the model 
    371377            if row_num is None: 
     
    375381                row_num += 1 
    376382 
    377             # Apply combobox if required 
    378             if None not in (view, cbox): 
     383            if cbox is not None: 
    379384                view.setIndexWidget(item2.index(), cbox) 
    380385 
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    rc4c4957 r7f41584  
    30833083        # cell 3: min value 
    30843084        item3 = QtGui.QStandardItem() 
     3085        # set the cell to be non-editable 
     3086        item3.setFlags(item3.flags() ^ QtCore.Qt.ItemIsEditable) 
    30853087 
    30863088        # cell 4: max value 
    30873089        item4 = QtGui.QStandardItem() 
     3090        # set the cell to be non-editable 
     3091        item4.setFlags(item4.flags() ^ QtCore.Qt.ItemIsEditable) 
    30883092 
    30893093        # cell 4: SLD button 
     
    31253129            # no info about limits 
    31263130            pass 
     3131        except OverflowError: 
     3132            # Try to limit shell_par, if possible 
     3133            if float(shell_par.limits[1])==np.inf: 
     3134                shell_max = 9 
     3135            logging.warning("Limiting shell count to 9.") 
    31273136        except Exception as ex: 
    31283137            logging.error("Badly defined multiplicity: "+ str(ex)) 
  • src/sas/qtgui/Perspectives/Fitting/ViewDelegate.py

    r722b7d6 r7f41584  
    9595            # Set some columns uneditable 
    9696            return None 
     97        if index.column() in (self.param_min, self.param_max): 
     98            # Check if the edit role is set 
     99            if not (index.flags() & QtCore.Qt.ItemIsEditable): 
     100                return None 
    97101 
    98102        return super(ModelViewDelegate, self).createEditor(widget, option, index) 
Note: See TracChangeset for help on using the changeset viewer.