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

PixelPaint: Remove hand-rolled type information in favor of RTTI

This commit is contained in:
Andreas Kling 2021-01-01 15:55:48 +01:00
parent ef5e9af6d3
commit 167906d02b
12 changed files with 2 additions and 22 deletions

View file

@ -27,6 +27,7 @@
#include "ImageEditor.h"
#include "Image.h"
#include "Layer.h"
#include "MoveTool.h"
#include "Tool.h"
#include <LibGUI/Command.h>
#include <LibGUI/Painter.h>
@ -203,7 +204,7 @@ void ImageEditor::mousedown_event(GUI::MouseEvent& event)
if (!m_active_tool)
return;
if (m_active_tool->is_move_tool()) {
if (is<MoveTool>(*m_active_tool)) {
if (auto* other_layer = layer_at_editor_position(event.position())) {
set_active_layer(other_layer);
}