1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 02:28:12 +00:00

PixelPaint: Tighten update rects for Tools

This tightens the update rects for EraseTool, BrushTool And the marching
ants update in Selection. Inflate Selection update rect by 10x10 to
avoid misalignment when zoomed out.
This commit is contained in:
Marcus Nilsson 2021-08-07 23:37:13 +02:00 committed by Andreas Kling
parent 8c81d195c7
commit 854e16797e
3 changed files with 4 additions and 4 deletions

View file

@ -24,7 +24,7 @@ Selection::Selection(ImageEditor& editor)
++m_marching_ants_offset;
m_marching_ants_offset %= (marching_ant_length * 2);
if (!is_empty() || m_in_interactive_selection)
m_editor.update();
m_editor.update(m_editor.image_rect_to_editor_rect(bounding_rect().inflated(10, 10)).to_type<int>());
});
m_marching_ants_timer->start();
}