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

PixelPaint: Use the currently_edited_bitmap in the Tools

This way, you can actually edit the mask of a Layer!
This commit is contained in:
Tobias Christiansen 2022-03-07 22:37:26 +01:00 committed by Andreas Kling
parent 96829565d8
commit f972f8e7a8
7 changed files with 11 additions and 11 deletions

View file

@ -60,7 +60,7 @@ void LineTool::on_mouseup(Layer* layer, MouseEvent& event)
auto& layer_event = event.layer_event();
if (layer_event.button() == m_drawing_button) {
GUI::Painter painter(layer->content_bitmap());
GUI::Painter painter(layer->currently_edited_bitmap());
painter.draw_line(m_line_start_position, m_line_end_position, m_editor->color_for(m_drawing_button), m_thickness);
m_drawing_button = GUI::MouseButton::None;
layer->did_modify_bitmap();