1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:28:12 +00:00

PixelPaint: Add selection functionality to the LayerListWidget

Now we can get rid of the old table view and with it the LayerModel.
This commit is contained in:
Andreas Kling 2020-05-26 09:51:28 +02:00
parent e4b11a23b7
commit 18d68c8c94
10 changed files with 77 additions and 185 deletions

View file

@ -27,7 +27,6 @@
#include "ImageEditor.h"
#include "Image.h"
#include "Layer.h"
#include "LayerModel.h"
#include "Tool.h"
#include <LibGUI/Painter.h>
#include <LibGfx/FloatRect.h>
@ -268,7 +267,7 @@ void ImageEditor::set_active_layer(Layer* layer)
break;
}
if (on_active_layer_change)
on_active_layer_change(m_image->layer_model().index(index));
on_active_layer_change(layer);
} else {
if (on_active_layer_change)
on_active_layer_change({});
@ -293,7 +292,6 @@ void ImageEditor::set_active_tool(Tool* tool)
void ImageEditor::layers_did_change()
{
static_cast<LayerModel&>(m_image->layer_model()).update_without_invalidating_indexes();
update();
}