comparison base/Clipboard.cpp @ 383:94fc0591ea43 1.2-stable

* merge from trunk (1.2 ended up being tracked from trunk, but we may want this branch for fixes later)
author Chris Cannam
date Wed, 27 Feb 2008 10:32:45 +0000
parents 516819f2b97b
children
comparison
equal deleted inserted replaced
349:f39d33b0b265 383:94fc0591ea43
175 Clipboard::Point::haveReferenceFrame() const 175 Clipboard::Point::haveReferenceFrame() const
176 { 176 {
177 return m_haveReferenceFrame; 177 return m_haveReferenceFrame;
178 } 178 }
179 179
180 bool
181 Clipboard::Point::referenceFrameDiffers() const
182 {
183 return m_haveReferenceFrame && (m_referenceFrame != m_frame);
184 }
185
180 long 186 long
181 Clipboard::Point::getReferenceFrame() const 187 Clipboard::Point::getReferenceFrame() const
182 { 188 {
183 return m_referenceFrame; 189 return m_referenceFrame;
184 } 190 }
185 191
186 void 192 void
187 Clipboard::Point::setReferenceFrame(long f) 193 Clipboard::Point::setReferenceFrame(long f)
188 { 194 {
189 if (f != m_frame) m_haveReferenceFrame = true; 195 m_haveReferenceFrame = true;
190 m_referenceFrame = f; 196 m_referenceFrame = f;
191 } 197 }
192 198
193 Clipboard::Clipboard() { } 199 Clipboard::Clipboard() { }
194 Clipboard::~Clipboard() { } 200 Clipboard::~Clipboard() { }
231 if (i->haveReferenceFrame()) return true; 237 if (i->haveReferenceFrame()) return true;
232 } 238 }
233 return false; 239 return false;
234 } 240 }
235 241
242 bool
243 Clipboard::referenceFramesDiffer() const
244 {
245 for (PointList::const_iterator i = m_points.begin();
246 i != m_points.end(); ++i) {
247 if (i->referenceFrameDiffers()) return true;
248 }
249 return false;
250 }
251