Fix positioning of reel labels in the timeline.
authorCarl Hetherington <cth@carlh.net>
Fri, 26 Feb 2016 21:34:30 +0000 (21:34 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 26 Feb 2016 21:34:30 +0000 (21:34 +0000)
src/wx/timeline_reels_view.cc

index 6c3da465e93dc4600f77d03e7c0b38f25bdbc036..d80199d6439251ef84efacaa4e052eedc1dec3eb 100644 (file)
@@ -87,7 +87,7 @@ TimelineReelsView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> >)
                wxDouble str_leading;
                gc->GetTextExtent (str, &str_width, &str_height, &str_descent, &str_leading);
 
-               int const available_width = time_x (DCPTime (i.to.get() - i.from.get()));
+               int const available_width = time_x (DCPTime (i.to.get())) - time_x (DCPTime (i.from.get()));
 
                if (available_width > str_width) {
                        gc->DrawText (str, time_x (DCPTime (i.from.get())) + (available_width - str_width) / 2, _y + 4);