Changeset d813cf9a in sasview for src/sas/qtgui


Ignore:
Timestamp:
May 15, 2018 3:54:41 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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:
bc3debf8
Parents:
f9214aa
Message:

Fix presentation of results in the Density calculator

File:
1 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 
Note: See TracChangeset for help on using the changeset viewer.