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