mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 04:19:12 +00:00
Enable reverse frames command only when we have two or more selected frames (fix #711)
This commit is contained in:
parent
e6ca8c9463
commit
34183ba207
@ -38,7 +38,12 @@ ReverseFramesCommand::ReverseFramesCommand()
|
||||
|
||||
bool ReverseFramesCommand::onEnabled(Context* context)
|
||||
{
|
||||
return context->checkFlags(ContextFlags::ActiveDocumentIsWritable);
|
||||
DocumentRange range = App::instance()->getMainWindow()->getTimeline()->range();
|
||||
|
||||
return
|
||||
context->checkFlags(ContextFlags::ActiveDocumentIsWritable) &&
|
||||
range.enabled() &&
|
||||
range.frames() >= 2; // We need at least 2 frames to reverse
|
||||
}
|
||||
|
||||
void ReverseFramesCommand::onExecute(Context* context)
|
||||
|
Loading…
x
Reference in New Issue
Block a user