mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-30 13:20:28 +00:00
Add auto-scroll on moving cel & moving selection states
This commit is contained in:
parent
b8c64b31c1
commit
4250809b1e
@ -200,7 +200,8 @@ bool MovingCelState::onMouseUp(Editor* editor, MouseMessage* msg)
|
||||
|
||||
bool MovingCelState::onMouseMove(Editor* editor, MouseMessage* msg)
|
||||
{
|
||||
gfx::PointF newCursorPos = editor->screenToEditorF(msg->position());
|
||||
const gfx::Point mousePos = editor->autoScroll(msg, AutoScroll::MouseDir);
|
||||
const gfx::PointF newCursorPos = editor->screenToEditorF(mousePos);
|
||||
|
||||
switch (m_handle) {
|
||||
|
||||
|
@ -80,7 +80,8 @@ bool MovingSelectionState::onMouseUp(Editor* editor, MouseMessage* msg)
|
||||
|
||||
bool MovingSelectionState::onMouseMove(Editor* editor, MouseMessage* msg)
|
||||
{
|
||||
const gfx::Point newCursorPos = editor->screenToEditor(msg->position());
|
||||
const gfx::Point mousePos = editor->autoScroll(msg, AutoScroll::MouseDir);
|
||||
const gfx::Point newCursorPos = editor->screenToEditor(mousePos);
|
||||
m_delta = newCursorPos - m_cursorStart;
|
||||
const gfx::Point newMaskOrigin = m_selOrigin + m_delta;
|
||||
const gfx::Point oldMaskOrigin = editor->document()->mask()->bounds().origin();
|
||||
|
Loading…
x
Reference in New Issue
Block a user