From a3491a13dfa6b4ad606e82ea699507cfe56eeea5 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 9 Feb 2024 11:49:57 -0700 Subject: [PATCH] fix drawing translation issue --- gtk2_ardour/prh.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/prh.cc b/gtk2_ardour/prh.cc index 9692d0c81e..25e9208858 100644 --- a/gtk2_ardour/prh.cc +++ b/gtk2_ardour/prh.cc @@ -292,9 +292,9 @@ PianoRollHeader::render (ArdourCanvas::Rect const & area, Cairo::RefPtrsave (); - // cr->translate (origin.x, origin.y); + cr->translate (origin.x, origin.y); - Rect self (item_to_window (get())); + Rect self (get()); double y1 = max (self.y0, 0.); double y2 = min (self.y1, (ArdourCanvas::Coord) floor(_view.midi_context().contents_height())); @@ -711,6 +711,7 @@ PianoRollHeader::motion_handler (GdkEventMotion* ev) bool PianoRollHeader::button_press_handler (GdkEventButton* ev) { + /* Convert canvas-coordinates to item coordinates */ Duple evd (canvas_to_item (Duple (ev->x, ev->y))); _scroomer_button_state = _scroomer_state;