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:
parent
ef5e9af6d3
commit
167906d02b
12 changed files with 2 additions and 22 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue