mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
PixelPaint: Allow the gradient tool to work with selections
Previously the call to layer->did_modify_bitmap() was missing so the selection was not applied.
This commit is contained in:
parent
681ed93a41
commit
69580d7f0e
1 changed files with 6 additions and 4 deletions
|
@ -216,12 +216,14 @@ void GradientTool::rasterize_gradient()
|
|||
{
|
||||
if (!has_gradient_start_end())
|
||||
return;
|
||||
auto layer = m_editor->active_layer();
|
||||
if (!layer)
|
||||
return;
|
||||
|
||||
GUI::Painter painter(m_editor->active_layer()->get_scratch_edited_bitmap());
|
||||
GUI::Painter painter(layer->get_scratch_edited_bitmap());
|
||||
draw_gradient(painter);
|
||||
|
||||
m_editor->did_complete_action("Gradient Tool"sv);
|
||||
|
||||
layer->did_modify_bitmap(layer->get_scratch_edited_bitmap().rect());
|
||||
m_editor->did_complete_action(tool_name());
|
||||
reset();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue