Removed some TODO's

This commit is contained in:
Michael R. Fisher 2011-10-23 04:52:30 -05:00
parent 0aa3ca76d1
commit 1bb584f895

View file

@ -35,8 +35,7 @@ TimelineViewWindow::TimelineViewWindow (Offset offset, int64_t scale)
: timeOffset(offset) : timeOffset(offset)
, timeScale(scale) , timeScale(scale)
{ {
TODO("Create a function to limit timescale between 1 and MaxScale");
TODO("TICKET #795 Some functions need to be private");
} }
Offset Offset
@ -90,7 +89,7 @@ TimelineViewWindow::zoom_view(int point, double time_scale_ratio)
{ {
// Apply the smoothing factor // Apply the smoothing factor
int64_t new_time_scale = int64_t new_time_scale =
(int64_t)( pow(time_scale_ratio, TimelineWidget::ZoomSmoothing) * (int64_t)(pow(time_scale_ratio, TimelineWidget::ZoomSmoothing) *
(double)TimelineWidget::MaxScale); (double)TimelineWidget::MaxScale);
/* Prevent Zooming in To Close and Far */ /* Prevent Zooming in To Close and Far */
@ -102,8 +101,8 @@ TimelineViewWindow::zoom_view(int point, double time_scale_ratio)
// The view must be shifted so that the zoom is centred on the cursor // The view must be shifted so that the zoom is centred on the cursor
TimeVar newStartPoint = get_time_offset(); TimeVar newStartPoint = get_time_offset();
newStartPoint += TimeValue(point * (timeScale - new_time_scale)); newStartPoint += TimeValue (point * (timeScale - new_time_scale));
set_time_offset(newStartPoint); set_time_offset (newStartPoint);
// Apply the new scale // Apply the new scale
set_time_scale(new_time_scale); set_time_scale(new_time_scale);
@ -112,13 +111,13 @@ TimelineViewWindow::zoom_view(int point, double time_scale_ratio)
void void
TimelineViewWindow::shift_view(int view_width, int shift_size) TimelineViewWindow::shift_view(int view_width, int shift_size)
{ {
set_time_offset(timeOffset + TimeValue(timeScale * shift_size * view_width / 256)); set_time_offset (timeOffset + TimeValue(timeScale * shift_size * view_width / 256));
} }
int int
TimelineViewWindow::time_to_x(TimeValue const& time) const TimelineViewWindow::time_to_x(TimeValue const& time) const
{ {
return int(_raw(time - timeOffset) / timeScale); //////TODO protect against values out-of range return int (_raw(time - timeOffset) / timeScale); //////TODO protect against values out-of range
} }
Time Time