Mercurial > hg > svgui
diff widgets/PropertyBox.cpp @ 1148:c0d841cb8ab9 tony-2.0-integration
Merge latest SV 3.0 branch code
author | Chris Cannam |
---|---|
date | Fri, 19 Aug 2016 15:58:57 +0100 |
parents | 5c3333fb70b3 |
children | db90fee630bc |
line wrap: on
line diff
--- a/widgets/PropertyBox.cpp Tue Oct 20 12:55:09 2015 +0100 +++ b/widgets/PropertyBox.cpp Fri Aug 19 15:58:57 2016 +0100 @@ -212,10 +212,10 @@ gainDial->setFixedWidth(24); gainDial->setFixedHeight(24); gainDial->setNotchesVisible(false); - gainDial->setDefaultValue(0); gainDial->setObjectName(tr("Playback Gain")); gainDial->setRangeMapper(new LinearRangeMapper (-50, 50, -25, 25, tr("dB"))); + gainDial->setDefaultValue(0); gainDial->setShowToolTip(true); connect(gainDial, SIGNAL(valueChanged(int)), this, SLOT(playGainDialChanged(int))); @@ -384,8 +384,10 @@ dial->setMaximum(max); dial->setPageStep(1); dial->setNotchesVisible((max - min) <= 12); + // important to set the range mapper before the default, + // because the range mapper is used to map the default + dial->setRangeMapper(m_container->getNewPropertyRangeMapper(name)); dial->setDefaultValue(deflt); - dial->setRangeMapper(m_container->getNewPropertyRangeMapper(name)); dial->setShowToolTip(true); connect(dial, SIGNAL(valueChanged(int)), this, SLOT(propertyControllerChanged(int)));