mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
PixelPaint: Allow dragging when color picking using the Alt key
This commit is contained in:
parent
06e09cf415
commit
607c8045dc
1 changed files with 6 additions and 3 deletions
|
@ -417,10 +417,13 @@ void ImageEditor::mousemove_event(GUI::MouseEvent& event)
|
|||
on_image_mouse_position_change(image_event.position());
|
||||
}
|
||||
|
||||
if (!m_active_tool || (event.alt() && !m_active_tool->is_overriding_alt()))
|
||||
return;
|
||||
|
||||
auto layer_event = m_active_layer ? event_adjusted_for_layer(event, *m_active_layer) : event;
|
||||
if (m_active_tool && event.alt() && !m_active_tool->is_overriding_alt()) {
|
||||
set_override_cursor(Gfx::StandardCursor::Eyedropper);
|
||||
set_editor_color_to_color_at_mouse_position(layer_event);
|
||||
return;
|
||||
}
|
||||
|
||||
Tool::MouseEvent tool_event(Tool::MouseEvent::Action::MouseDown, layer_event, image_event, event);
|
||||
m_active_tool->on_mousemove(m_active_layer.ptr(), tool_event);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue