Changeset 4a0d3197 in sasview


Ignore:
Timestamp:
May 15, 2018 2:04:13 AM (6 years ago)
Author:
wojciech
Branches:
ESS_GUI, 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:
085e3c9d, 6459916
Parents:
5a731c63 (diff), bc3debf8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'ESS_GUI' of https://github.com/SasView/sasview into ESS_GUI

Location:
src/sas/qtgui/Calculators
Files:
5 edited

Legend:

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

    raed0532 rd813cf9a  
    1616 
    1717from sas.qtgui.Utilities.GuiUtils import enum 
     18from sas.qtgui.Utilities.GuiUtils import formatNumber 
    1819 
    1920MODEL = enum( 
     
    9899            if index == MODEL.MOLECULAR_FORMULA: 
    99100                molarMass = toMolarMass(self.model.item(MODEL.MOLECULAR_FORMULA).text()) 
     101                molarMass = formatNumber(molarMass, high=True) 
    100102                self.model.item(MODEL.MOLAR_MASS).setText(molarMass) 
    101103 
     
    120122 
    121123            molarDensity = molarMass / molarVolume 
     124            molarDensity = formatNumber(molarDensity, high=True) 
    122125            self.model.item(MODEL.MASS_DENSITY).setText(str(molarDensity)) 
    123126 
     
    131134 
    132135            molarVolume = molarMass / molarDensity 
     136            molarVolume = formatNumber(molarVolume, high=True) 
    133137            self.model.item(MODEL.MOLAR_VOLUME).setText(str(molarVolume)) 
    134138 
  • src/sas/qtgui/Calculators/UnitTesting/DensityCalculatorTest.py

    re90988c rbc3debf8  
    7878 
    7979        # Assure the mass density field is set 
    80         self.assertEqual(self.widget.ui.editMassDensity.text(), '18.0153') 
     80        self.assertEqual(self.widget.ui.editMassDensity.text(), '18.015') 
    8181 
    8282        # Change mass density 
     
    8888 
    8989        # Assure the molar volume field got updated 
    90         self.assertEqual(self.widget.ui.editMolarVolume.text(), '1.12595625') 
     90        self.assertEqual(self.widget.ui.editMolarVolume.text(), '1.126') 
    9191 
    9292    def testComplexEntryAndReset(self): 
     
    113113 
    114114        self.assertEqual(self.widget.ui.editMolecularFormula.text(), "H2O") 
    115         self.assertEqual(self.widget.ui.editMolarMass.text(), "18.0153") 
     115        self.assertEqual(self.widget.ui.editMolarMass.text(), "18.015") 
    116116        self.assertEqual(self.widget.ui.editMolarVolume.text(), "") 
    117117        self.assertEqual(self.widget.ui.editMassDensity.text(), "") 
  • src/sas/qtgui/Calculators/media/data_oper_pic.png

    • Property mode changed from 100755 to 100644
  • src/sas/qtgui/Calculators/media/density_calculator_help.rst

    r417c03f r5a731c63  
    2727   then type in an input value. 
    2828 
    29 4) Click the 'Calculate' button to perform the calculation. 
     294) Press Tab button or click out to perform the calculation. 
    3030 
    3131.. image:: density_tutor.png 
  • src/sas/qtgui/Calculators/media/density_tutor.png

    • Property mode changed from 100755 to 100644
Note: See TracChangeset for help on using the changeset viewer.