diff --git a/src/Data/LocalizedOrbitals.h b/src/Data/LocalizedOrbitals.h index eed3338b..59b35386 100644 --- a/src/Data/LocalizedOrbitals.h +++ b/src/Data/LocalizedOrbitals.h @@ -53,10 +53,11 @@ namespace Data { QString label(unsigned index, bool alpha = true) const { - QString s(QString::number(index+1)); - unsigned n(alpha ? m_nAlpha : m_nBeta); - if (index < n) s += " (occ)"; - return s; + unsigned n(alpha ? m_nAlpha : m_nBeta); + QString s(alpha ? "Alpha " : "Beta "); + s += QString::number(index+1); + if (index < n) s += " (occ)"; + return s; } unsigned labelIndex(bool const alpha) const diff --git a/src/Layer/CanonicalOrbitalsLayer.C b/src/Layer/CanonicalOrbitalsLayer.C index 3a9b5a4a..058b24fd 100644 --- a/src/Layer/CanonicalOrbitalsLayer.C +++ b/src/Layer/CanonicalOrbitalsLayer.C @@ -140,12 +140,13 @@ QString CanonicalOrbitals::description(Data::SurfaceInfo const& info, if (type.isOrbital()) { unsigned index(type.index()); - label = m_canonicalOrbitals.label(index); + bool isAlpha(type.kind() == Data::SurfaceType::AlphaOrbital); + + label = m_canonicalOrbitals.label(index, isAlpha); if (tooltip) { double orbitalEnergy(0.0); - Data::SurfaceType::Kind kind(type.kind()); - if (kind == Data::SurfaceType::AlphaOrbital) { + if (isAlpha) { orbitalEnergy = m_canonicalOrbitals.alphaOrbitalEnergy(index); }else { orbitalEnergy = m_canonicalOrbitals.betaOrbitalEnergy(index); diff --git a/src/Layer/OrbitalsLayer.C b/src/Layer/OrbitalsLayer.C index 74bb4f7a..e4b3872a 100644 --- a/src/Layer/OrbitalsLayer.C +++ b/src/Layer/OrbitalsLayer.C @@ -207,17 +207,13 @@ QList Orbitals::findGrids(Data::SurfaceType::Kind const& QString Orbitals::description(Data::SurfaceInfo const& info, bool const tooltip) { Data::SurfaceType const& type(info.type()); - QString label(type.toString()); + QString label; if (type.isOrbital()) { - Data::SurfaceType::Kind kind(type.kind()); - - unsigned nElectrons = kind == Data::SurfaceType::AlphaOrbital ? nAlpha() : nBeta(); unsigned index(type.index()); + bool isAlpha(type.kind() == Data::SurfaceType::AlphaOrbital); - if (index <= nElectrons) { - label += " (occ)"; - } + label = m_orbitals.label(index, isAlpha); } if (tooltip) label += "\nIsovalue = " + QString::number(info.isovalue(), 'f', 3);