mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-24 00:48:41 -05:00
ValueDialZ: when setting range fix zero display initial value
This commit is contained in:
parent
d68641df0e
commit
3641eb7295
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user