From 87d17f6624b029067f2a62dadc269321a4753232 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 6 Jul 2022 20:04:14 +0200 Subject: [PATCH] Prevent rendering outside of canvas scroll groups This fixes automation lanes bleeding into the ruler area. The bounding box of all items in the main canvas group starts at -0.5, and the cursor-scroll-group at -1.5. This is calculated to include line-width, and outlines outside the item(s). A scroll-group however must not extend its render area to render those. --- libs/canvas/scroll_group.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/canvas/scroll_group.cc b/libs/canvas/scroll_group.cc index fbea90a2c6..c24c07e01c 100644 --- a/libs/canvas/scroll_group.cc +++ b/libs/canvas/scroll_group.cc @@ -53,6 +53,9 @@ ScrollGroup::render (Rect const & area, Cairo::RefPtr context) c return; } + r.x0 = max (r.x0, 0.); + r.y0 = max (r.y0, 0.); + Rect self (_position.x + r.x0, _position.y + r.y0, _position.x + r.x1,