1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-05 11:07:34 +00:00

PixelPaint: Allow reordering layer by dragging them in LayerListWidget

This is rather cool! :^)
This commit is contained in:
Andreas Kling 2020-05-25 23:48:09 +02:00
parent dc3de47b03
commit e4b11a23b7
6 changed files with 169 additions and 16 deletions

View file

@ -39,10 +39,22 @@ ImageEditor::ImageEditor()
{
}
ImageEditor::~ImageEditor()
{
if (m_image)
m_image->remove_client(*this);
}
void ImageEditor::set_image(RefPtr<Image> image)
{
if (m_image)
m_image->remove_client(*this);
m_image = move(image);
update();
if (m_image)
m_image->add_client(*this);
}
void ImageEditor::paint_event(GUI::PaintEvent& event)