mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +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
Notes:
sideshowbarker
2024-07-17 08:34:29 +09:00
Author: https://github.com/MacDue Commit: https://github.com/SerenityOS/serenity/commit/69580d7f0e Pull-request: https://github.com/SerenityOS/serenity/pull/17196 Reviewed-by: https://github.com/gmta
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…
Reference in a new issue