mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-21 16:58:58 +00:00
PixelPaint: Set initial position correctly when using the move tool
This fixes an issue, where single clicking in the corner of the image without moving the mouse would cause the layer to jump to the top left corner of the canvas.
This commit is contained in:
parent
403c0e6dab
commit
7b3bc883f1
Notes:
sideshowbarker
2024-07-17 07:43:44 +09:00
Author: https://github.com/tcl3
Commit: 7b3bc883f1
Pull-request: https://github.com/SerenityOS/serenity/pull/17211
Reviewed-by: https://github.com/MacDue ✅
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, the SerenityOS developers.
|
||||
* Copyright (c) 2022-2023, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -41,7 +41,7 @@ void MoveTool::on_mousedown(Layer* layer, MouseEvent& event)
|
|||
m_layer_being_moved = *layer;
|
||||
m_event_origin = image_event.position();
|
||||
m_layer_origin = layer->location();
|
||||
m_new_layer_rect = m_editor->active_layer()->rect();
|
||||
m_new_layer_rect = m_editor->active_layer()->relative_rect();
|
||||
}
|
||||
|
||||
void MoveTool::on_mousemove(Layer* layer, MouseEvent& event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue