From 607c8045dc1426a2596a4299f5998e8e8324c493 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Wed, 18 Jan 2023 19:37:26 +0000 Subject: [PATCH] PixelPaint: Allow dragging when color picking using the Alt key --- Userland/Applications/PixelPaint/ImageEditor.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Userland/Applications/PixelPaint/ImageEditor.cpp b/Userland/Applications/PixelPaint/ImageEditor.cpp index a361d2e3a7..962bd3e9f8 100644 --- a/Userland/Applications/PixelPaint/ImageEditor.cpp +++ b/Userland/Applications/PixelPaint/ImageEditor.cpp @@ -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); }