mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 13:47:01 -04:00
Spectrum: implemented linear scale mode
This commit is contained in:
@@ -31,7 +31,11 @@ QString ScaleEngine::formatTick(double value, int decimalPlaces)
|
||||
{
|
||||
if (m_physicalUnit != Unit::TimeHMS)
|
||||
{
|
||||
return QString("%1").arg(m_makeOpposite ? -value : value, 0, 'f', decimalPlaces);
|
||||
if (m_physicalUnit == Unit::Scientific) {
|
||||
return QString("%1").arg(m_makeOpposite ? -value : value, 0, 'e', 2);
|
||||
} else {
|
||||
return QString("%1").arg(m_makeOpposite ? -value : value, 0, 'f', decimalPlaces);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -106,6 +110,7 @@ void ScaleEngine::calcScaleFactor()
|
||||
|
||||
switch(m_physicalUnit) {
|
||||
case Unit::None:
|
||||
case Unit::Scientific:
|
||||
m_unitStr.clear();
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user