1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-21 23:55:13 -05:00

valuedialz: Check range against m_valueNew rather than m_value, as that holds the most recently set value

This commit is contained in:
Jon Beniston 2021-10-05 14:20:05 +01:00
parent dc7232ee4f
commit e248d8144c

View File

@ -142,9 +142,9 @@ 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_value < m_valueMin) {
if(m_valueNew < m_valueMin) {
setValue(m_valueMin);
} else if(m_value > m_valueMax) {
} else if(m_valueNew > m_valueMax) {
setValue(m_valueMax);
}
}