Changeset b6f47be in sasview for src/sas


Ignore:
Timestamp:
Sep 27, 2018 5:39:55 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:
3e314e6
Parents:
51b9c14
Message:

Allow widget resize. Update model on every text change of molecular
formula line edit.
SASVIEW-1139

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Calculators/DensityPanel.py

    r51b9c14 rb6f47be  
    5555        self.ui.setupUi(self) 
    5656 
    57         # no reason to have this widget resizable 
    58         self.setFixedSize(self.minimumSizeHint()) 
     57        #self.setFixedSize(self.minimumSizeHint()) 
     58        self.resize(self.minimumSizeHint()) 
    5959 
    6060        # set validators 
     
    144144        try: 
    145145            molarMass = toMolarMass(current_text) 
    146             molarMass = formatNumber(molarMass, high=True) 
    147             self.model.item(MODEL.MOLAR_MASS).setText(molarMass) 
     146            # if this doesn't fail, update the model item for formula 
     147            # so related values can get recomputed 
     148            self.model.item(MODEL.MOLECULAR_FORMULA).setText(current_text) 
    148149 
    149150        except (ArithmeticError, ValueError): 
Note: See TracChangeset for help on using the changeset viewer.