Now Editor::controlInfiniteScroll() is called when the editor's state is MOVING_PIXELS but even when the user is not dragging the pixels (just the mouse captured).

This commit is contained in:
David Capello 2010-05-06 23:34:30 -03:00
parent e5c7bf34fa
commit 4a9f6cf520

View File

@ -1118,11 +1118,11 @@ bool Editor::msg_proc(JMessage msg)
}
// Moving pixels
else if (m_state == EDITOR_STATE_MOVING_PIXELS) {
// Infinite scroll
controlInfiniteScroll(msg);
// If there is a button pressed
if (m_pixelsMovement->isDragging()) {
// Infinite scroll
controlInfiniteScroll(msg);
// Get the position of the mouse in the sprite
int x, y;
screen_to_editor(msg->mouse.x, msg->mouse.y, &x, &y);