comparison 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
comparison
equal deleted inserted replaced
215:d2334a77db73 216:34bbbcb3c01f
94 return PropertyContainer::InvalidProperty; 94 return PropertyContainer::InvalidProperty;
95 } 95 }
96 96
97 int 97 int
98 View::getPropertyRangeAndValue(const PropertyContainer::PropertyName &name, 98 View::getPropertyRangeAndValue(const PropertyContainer::PropertyName &name,
99 int *min, int *max) const 99 int *min, int *max, int *deflt) const
100 { 100 {
101 if (deflt) *deflt = 1;
101 if (name == "Global Scroll") return m_followPan; 102 if (name == "Global Scroll") return m_followPan;
102 if (name == "Global Zoom") return m_followZoom; 103 if (name == "Global Zoom") return m_followZoom;
103 if (name == "Follow Playback") { 104 if (name == "Follow Playback") {
104 if (min) *min = 0; 105 if (min) *min = 0;
105 if (max) *max = 2; 106 if (max) *max = 2;
107 if (deflt) *deflt = int(PlaybackScrollPage);
106 return int(m_followPlay); 108 return int(m_followPlay);
107 } 109 }
108 if (min) *min = 0; 110 if (min) *min = 0;
109 if (max) *max = 0; 111 if (max) *max = 0;
112 if (deflt) *deflt = 0;
110 return 0; 113 return 0;
111 } 114 }
112 115
113 QString 116 QString
114 View::getPropertyValueLabel(const PropertyContainer::PropertyName &name, 117 View::getPropertyValueLabel(const PropertyContainer::PropertyName &name,