PaintBrush: Add "Delete layer" action to move tool context menu

This commit is contained in:
Andreas Kling 2020-05-13 22:12:14 +02:00
commit 40a72883ff
Notes: sideshowbarker 2024-07-19 06:39:41 +09:00
3 changed files with 18 additions and 2 deletions

View file

@ -104,4 +104,11 @@ void Image::move_layer_to_front(Layer& layer)
m_layers.append(layer);
}
void Image::remove_layer(Layer& layer)
{
NonnullRefPtr<Layer> protector(layer);
auto index = index_of(layer);
m_layers.remove(index);
}
}