mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 17:28:50 -05:00
Fix display when setValueRange is called and newValue differs from value.
This commit is contained in:
parent
eea3214ec0
commit
abe55f8d19
@ -150,6 +150,18 @@ void ValueDial::setValueRange(uint numDigits, quint64 min, quint64 max)
|
||||
m_valueMin = min;
|
||||
m_valueMax = max;
|
||||
|
||||
if (m_animationTimer.isActive())
|
||||
{
|
||||
m_textNew = formatText(m_valueNew);
|
||||
|
||||
if (m_valueNew < min) {
|
||||
setValue(min);
|
||||
} else if (m_valueNew > max) {
|
||||
setValue(max);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_text = formatText(m_value);
|
||||
|
||||
if (m_value < min) {
|
||||
@ -157,6 +169,7 @@ void ValueDial::setValueRange(uint numDigits, quint64 min, quint64 max)
|
||||
} else if (m_value > max) {
|
||||
setValue(max);
|
||||
}
|
||||
}
|
||||
|
||||
setFixedWidth((m_numDigits + m_numDecimalPoints) * m_digitWidth + 2);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user