mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +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:
parent
96829565d8
commit
f972f8e7a8
7 changed files with 11 additions and 11 deletions
|
@ -82,10 +82,10 @@ void BucketTool::on_mousedown(Layer* layer, MouseEvent& event)
|
|||
if (!layer->rect().contains(layer_event.position()))
|
||||
return;
|
||||
|
||||
GUI::Painter painter(layer->content_bitmap());
|
||||
auto target_color = layer->content_bitmap().get_pixel(layer_event.x(), layer_event.y());
|
||||
GUI::Painter painter(layer->currently_edited_bitmap());
|
||||
auto target_color = layer->currently_edited_bitmap().get_pixel(layer_event.x(), layer_event.y());
|
||||
|
||||
flood_fill(layer->content_bitmap(), layer_event.position(), target_color, m_editor->color_for(layer_event), m_threshold);
|
||||
flood_fill(layer->currently_edited_bitmap(), layer_event.position(), target_color, m_editor->color_for(layer_event), m_threshold);
|
||||
|
||||
layer->did_modify_bitmap();
|
||||
m_editor->did_complete_action();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue