Mercurial > hg > svgui
diff widgets/PropertyBox.cpp @ 216:34bbbcb3c01f sv1-1.0pre1
* Make getPropertyRangeAndValue return the default separately from the current
value. Previously some contexts were incorrectly treating the current value
as a default.
author | Chris Cannam |
---|---|
date | Fri, 02 Mar 2007 14:00:12 +0000 |
parents | 6969f21da18a |
children | 21a5e4e7cb92 |
line wrap: on
line diff
--- a/widgets/PropertyBox.cpp Fri Mar 02 13:01:41 2007 +0000 +++ b/widgets/PropertyBox.cpp Fri Mar 02 14:00:12 2007 +0000 @@ -254,8 +254,8 @@ PropertyContainer::PropertyType type = m_container->getPropertyType(name); int row = m_layout->rowCount(); - int min = 0, max = 0, value = 0; - value = m_container->getPropertyRangeAndValue(name, &min, &max); + int min = 0, max = 0, value = 0, deflt = 0; + value = m_container->getPropertyRangeAndValue(name, &min, &max, &deflt); bool have = (m_propertyControllers.find(name) != m_propertyControllers.end()); @@ -358,7 +358,7 @@ dial->setMaximum(max); dial->setPageStep(1); dial->setNotchesVisible((max - min) <= 12); - dial->setDefaultValue(value); + dial->setDefaultValue(deflt); dial->setRangeMapper(m_container->getNewPropertyRangeMapper(name)); dial->setShowToolTip(true); connect(dial, SIGNAL(valueChanged(int)),