mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-11-03 13:11:20 -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_valueMin = min;
 | 
				
			||||||
    m_valueMax = max;
 | 
					    m_valueMax = max;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    m_text = formatText(m_value);
 | 
					    if (m_animationTimer.isActive())
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        m_textNew = formatText(m_valueNew);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (m_value < min) {
 | 
					        if (m_valueNew < min) {
 | 
				
			||||||
        setValue(min);
 | 
					            setValue(min);
 | 
				
			||||||
    } else if (m_value > max) {
 | 
					        } else if (m_valueNew > max) {
 | 
				
			||||||
        setValue(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);
 | 
					    setFixedWidth((m_numDigits + m_numDecimalPoints) * m_digitWidth + 2);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user