mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +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())
|
if (!has_gradient_start_end())
|
||||||
return;
|
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);
|
draw_gradient(painter);
|
||||||
|
layer->did_modify_bitmap(layer->get_scratch_edited_bitmap().rect());
|
||||||
m_editor->did_complete_action("Gradient Tool"sv);
|
m_editor->did_complete_action(tool_name());
|
||||||
|
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue