Mercurial > hg > svgui
diff view/View.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 | df791d8c8f58 |
children | bd2d0346da0e |
line wrap: on
line diff
--- a/view/View.cpp Fri Mar 02 13:01:41 2007 +0000 +++ b/view/View.cpp Fri Mar 02 14:00:12 2007 +0000 @@ -96,17 +96,20 @@ int View::getPropertyRangeAndValue(const PropertyContainer::PropertyName &name, - int *min, int *max) const + int *min, int *max, int *deflt) const { + if (deflt) *deflt = 1; if (name == "Global Scroll") return m_followPan; if (name == "Global Zoom") return m_followZoom; if (name == "Follow Playback") { if (min) *min = 0; if (max) *max = 2; + if (deflt) *deflt = int(PlaybackScrollPage); return int(m_followPlay); } if (min) *min = 0; if (max) *max = 0; + if (deflt) *deflt = 0; return 0; }