comparison layer/TimeRulerLayer.cpp @ 842:8432d2551fb2 tonioni

Update subrepos and merge from default branch
author Chris Cannam
date Tue, 02 Sep 2014 16:23:48 +0100
parents 44acc0e5e004
children 4a578a360011
comparison
equal deleted inserted replaced
826:43256b925e15 842:8432d2551fb2
235 235
236 QColor greyColour = getPartialShades(v)[1]; 236 QColor greyColour = getPartialShades(v)[1];
237 237
238 paint.save(); 238 paint.save();
239 239
240 // Do not label time zero - we now overlay an opaque area over
241 // time < 0 which would cut it in half
242 int minlabel = 1; // ms
243
240 while (1) { 244 while (1) {
241 245
242 // frame is used to determine where to draw the lines, so it 246 // frame is used to determine where to draw the lines, so it
243 // needs to correspond to an exact pixel (so that we don't get 247 // needs to correspond to an exact pixel (so that we don't get
244 // a different pixel when scrolling a small amount and 248 // a different pixel when scrolling a small amount and
260 cerr << "X well out of range, ending here" << endl; 264 cerr << "X well out of range, ending here" << endl;
261 #endif 265 #endif
262 break; 266 break;
263 } 267 }
264 268
265 if (x >= rect.x() - 50) { 269 if (x >= rect.x() - 50 && ms >= minlabel) {
266 270
267 RealTime rt = RealTime::fromMilliseconds(ms); 271 RealTime rt = RealTime::fromMilliseconds(ms);
268 272
269 #ifdef DEBUG_TIME_RULER_LAYER 273 #ifdef DEBUG_TIME_RULER_LAYER
270 cerr << "X in range, drawing line here for time " << rt.toText() << endl; 274 cerr << "X in range, drawing line here for time " << rt.toText() << endl;