comparison widgets/AudioDial.cpp @ 190:53835534a9d3

* Allow user to activate a pane by clicking on the tab for its currently active layer. Formerly nothing happened if you clicked on the tab that was already topmost in a given property stack, because the tab widget only emitted a signal if the current tab changed. We want this to switch focus back to the pane if another one has been active in the mean time. * Make the thumbwheels look a bit round.
author Chris Cannam
date Mon, 22 Jan 2007 15:42:00 +0000
parents 5b7472db612b
children 6969f21da18a
comparison
equal deleted inserted replaced
189:5b7472db612b 190:53835534a9d3
339 339
340 void AudioDial::setMappedValue(float mappedValue) 340 void AudioDial::setMappedValue(float mappedValue)
341 { 341 {
342 if (m_rangeMapper) { 342 if (m_rangeMapper) {
343 int newPosition = m_rangeMapper->getPositionForValue(mappedValue); 343 int newPosition = m_rangeMapper->getPositionForValue(mappedValue);
344 bool changed = (m_mappedValue != mappedValue);
344 m_mappedValue = mappedValue; 345 m_mappedValue = mappedValue;
345 m_noMappedUpdate = true; 346 m_noMappedUpdate = true;
346 std::cerr << "AudioDial::setMappedValue(" << mappedValue << "): new position is " << newPosition << std::endl; 347 std::cerr << "AudioDial::setMappedValue(" << mappedValue << "): new position is " << newPosition << std::endl;
347 if (newPosition != value()) { 348 if (newPosition != value()) {
348 setValue(newPosition); 349 setValue(newPosition);
349 } else { 350 } else if (changed) {
350 emit valueChanged(newPosition); 351 emit valueChanged(newPosition);
351 } 352 }
352 m_noMappedUpdate = false; 353 m_noMappedUpdate = false;
353 } else { 354 } else {
354 setValue(int(mappedValue)); 355 setValue(int(mappedValue));