mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-16 06:40:17 +00:00
Fix bug on macOS scrolling frames w/mouse wheel in the wrong direction
Sometimes macOS returns us a delta of 0.0, so we should not move through frames in that case.
This commit is contained in:
parent
eacf28b65a
commit
abc586a6d4
@ -113,15 +113,18 @@ bool StateWithWheelBehavior::onMouseWheel(Editor* editor, MouseMessage* msg)
|
||||
}
|
||||
break;
|
||||
|
||||
case WHEEL_FRAME:
|
||||
{
|
||||
Command* command = CommandsModule::instance()->getCommandByName
|
||||
((dz < 0.0) ? CommandId::GotoNextFrame:
|
||||
CommandId::GotoPreviousFrame);
|
||||
if (command)
|
||||
UIContext::instance()->executeCommand(command);
|
||||
}
|
||||
case WHEEL_FRAME: {
|
||||
Command* command = nullptr;
|
||||
|
||||
if (dz < 0.0)
|
||||
command = CommandsModule::instance()->getCommandByName(CommandId::GotoNextFrame);
|
||||
else if (dz > 0.0)
|
||||
command = CommandsModule::instance()->getCommandByName(CommandId::GotoPreviousFrame);
|
||||
|
||||
if (command)
|
||||
UIContext::instance()->executeCommand(command);
|
||||
break;
|
||||
}
|
||||
|
||||
case WHEEL_ZOOM: {
|
||||
render::Zoom zoom = editor->zoom();
|
||||
|
Loading…
x
Reference in New Issue
Block a user