1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:57:35 +00:00

PixelPaint: Only update the layer thumbnail on layer bitmap changes

When a layer bitmap is modified, we don't have to repaint the whole
layer gadget in the layer list, only the little thumbnail. :^)
This commit is contained in:
Andreas Kling 2021-07-09 21:33:30 +02:00
parent 285f0383d4
commit fd898be51a
4 changed files with 16 additions and 5 deletions

View file

@ -434,7 +434,7 @@ void Image::layer_did_modify_bitmap(Badge<Layer>, Layer const& layer, Gfx::IntRe
{
auto layer_index = index_of(layer);
for (auto* client : m_clients)
client->image_did_modify_layer(layer_index);
client->image_did_modify_layer_bitmap(layer_index);
did_change(modified_layer_rect.translated(layer.location()));
}
@ -443,7 +443,7 @@ void Image::layer_did_modify_properties(Badge<Layer>, Layer const& layer)
{
auto layer_index = index_of(layer);
for (auto* client : m_clients)
client->image_did_modify_layer(layer_index);
client->image_did_modify_layer_properties(layer_index);
did_change();
}