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
Notes: sideshowbarker 2024-07-19 06:08:04 +09:00
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)