Remove incorrect GC translation.
authorCarl Hetherington <cth@carlh.net>
Wed, 5 Apr 2023 20:02:13 +0000 (22:02 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 5 Apr 2023 20:02:13 +0000 (22:02 +0200)
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.

src/wx/timeline.cc

index de83e6ba3945bd1c22038b02e6162fdc6cfad2ac..d8e0e692e6f9fed0e283b253ec9f83641171d7c5 100644 (file)
@@ -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 (