diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-11-10 22:45:57 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-11-10 22:45:57 +0000 |
| commit | 965ef4eee76ffda616243ed94bd2314a71216570 (patch) | |
| tree | 6cea7c7732d45a809aae27585eddaecdc4b1f462 | |
| parent | 47ce246bdc8ac66184526ad1832bb1abf5e72a10 (diff) | |
Fix assertion failure when the only content is trimmed to zero length.
| -rw-r--r-- | src/wx/timeline_content_view.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/wx/timeline_content_view.cc b/src/wx/timeline_content_view.cc index df0772be9..324790f87 100644 --- a/src/wx/timeline_content_view.cc +++ b/src/wx/timeline_content_view.cc @@ -126,10 +126,9 @@ TimelineContentView::do_paint (wxGraphicsContext* gc) wxDouble name_height; wxDouble name_descent; wxDouble name_leading; + gc->SetFont (gc->CreateFont (*wxNORMAL_FONT, foreground_colour ())); gc->GetTextExtent (name, &name_width, &name_height, &name_descent, &name_leading); - gc->Clip (wxRegion (time_x (position), y_pos (_track.get()), len.seconds() * _timeline.pixels_per_second().get_value_or(0), _timeline.track_height())); - gc->SetFont (gc->CreateFont (*wxNORMAL_FONT, foreground_colour ())); gc->DrawText (name, time_x (position) + 12, y_pos (_track.get() + 1) - name_height - 4); gc->ResetClip (); } @@ -154,4 +153,3 @@ TimelineContentView::content_changed (int p, bool frequent) _timeline.Refresh (); } } - |
