diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-06-27 21:45:26 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-06-27 21:45:26 +0200 |
| commit | 8ade2fa07a6cf99210b48dd56df050505885ad92 (patch) | |
| tree | 5a022f58fb63cc0c1f27b08b07c980d2934b6f8e | |
| parent | 6076bdf28d75ce00c007ac9c21e48dacedbe31c1 (diff) | |
Avoid ResetClip() since (on GTK3, and maybe elsewhere) it seems to
reset some internally-setup clipping so that drawing can overlap
the canvas that it's on. Fixes #1769.
| -rw-r--r-- | src/wx/timeline_content_view.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wx/timeline_content_view.cc b/src/wx/timeline_content_view.cc index 6902a11d6..474b8d07f 100644 --- a/src/wx/timeline_content_view.cc +++ b/src/wx/timeline_content_view.cc @@ -149,9 +149,10 @@ TimelineContentView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> wxDouble lab_leading; gc->SetFont (gc->CreateFont (*wxNORMAL_FONT, foreground_colour ())); gc->GetTextExtent (lab, &lab_width, &lab_height, &lab_descent, &lab_leading); + gc->PushState (); gc->Clip (wxRegion (time_x (position), y_pos (_track.get()), len.seconds() * _timeline.pixels_per_second().get_value_or(0), _timeline.pixels_per_track())); gc->DrawText (lab, time_x (position) + 12, y_pos (_track.get() + 1) - lab_height - 4); - gc->ResetClip (); + gc->PopState (); } int |
