Mercurial > hg > svgui
comparison widgets/AudioDial.cpp @ 219:1fff998ae4a9
* Fix failure to update mapped value when setValue is called
author | Chris Cannam |
---|---|
date | Mon, 05 Mar 2007 13:01:14 +0000 |
parents | e554ab9a4408 |
children | e6d0b097d102 |
comparison
equal
deleted
inserted
replaced
218:21a5e4e7cb92 | 219:1fff998ae4a9 |
---|---|
335 { | 335 { |
336 m_defaultValue = defaultValue; | 336 m_defaultValue = defaultValue; |
337 } | 337 } |
338 | 338 |
339 | 339 |
340 void AudioDial::setValue(int value) | |
341 { | |
342 QDial::setValue(value); | |
343 updateMappedValue(value); | |
344 } | |
345 | |
346 | |
340 void AudioDial::setMappedValue(float mappedValue) | 347 void AudioDial::setMappedValue(float mappedValue) |
341 { | 348 { |
342 if (m_rangeMapper) { | 349 if (m_rangeMapper) { |
343 int newPosition = m_rangeMapper->getPositionForValue(mappedValue); | 350 int newPosition = m_rangeMapper->getPositionForValue(mappedValue); |
344 bool changed = (m_mappedValue != mappedValue); | 351 bool changed = (m_mappedValue != mappedValue); |