1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-27 18:28:54 -05:00

ValueDialZ: when setting range fix zero display initial value

This commit is contained in:
f4exb 2021-10-12 23:12:53 +02:00
parent d68641df0e
commit 3641eb7295

View File

@ -142,11 +142,21 @@ void ValueDialZ::setValueRange(bool positiveOnly, uint numDigits, qint64 min, qi
m_valueMin = positiveOnly ? (min < 0 ? 0 : min) : min;
m_valueMax = positiveOnly ? (max < 0 ? 0 : max) : max;
if(m_valueNew < m_valueMin) {
if (m_valueNew < m_valueMin)
{
setValue(m_valueMin);
} else if(m_valueNew > m_valueMax) {
}
else if (m_valueNew > m_valueMax)
{
setValue(m_valueMax);
}
else if (m_value == 0)
{
m_text = formatText(0);
m_textNew = m_text;
m_valueNew = m_value;
update();
}
}
quint64 ValueDialZ::findExponent(int digit)