From: Carl Hetherington Date: Wed, 5 Apr 2023 20:02:13 +0000 (+0200) Subject: Remove incorrect GC translation. X-Git-Tag: v2.16.52~9 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=99b2d9283f5bb1b8d4c2d51438802ce5e9dca5a6 Remove incorrect GC translation. This appears not to be necessary, and if present it messes up the scrollbars so that scrolling fully right shows a big empty space at the end of the timeline items. --- diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index de83e6ba3..d8e0e692e 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -190,10 +190,6 @@ Timeline::paint_main () ScopeGuard sg = [gc]() { delete gc; }; - int vsx, vsy; - _main_canvas->GetViewStart (&vsx, &vsy); - gc->Translate (-vsx * _x_scroll_rate, -vsy * _y_scroll_rate); - gc->SetAntialiasMode (wxANTIALIAS_DEFAULT); for (auto i: _views) { @@ -219,8 +215,6 @@ Timeline::paint_main () } if (_zoom_point) { - /* Translate back as _down_point and _zoom_point do not take scroll into account */ - gc->Translate (vsx * _x_scroll_rate, vsy * _y_scroll_rate); gc->SetPen(gui_is_dark() ? *wxWHITE_PEN : *wxBLACK_PEN); gc->SetBrush (*wxTRANSPARENT_BRUSH); gc->DrawRectangle (