mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-01 01:20:25 +00:00
Fix Clear command to delete the selection first when the range is enabled in one frame/one layer
This commit is contained in:
parent
0120ef58e1
commit
d470a6b78a
@ -66,7 +66,7 @@ void ClearCommand::onExecute(Context* context)
|
|||||||
{
|
{
|
||||||
// Clear of several frames is handled with RemoveCel command.
|
// Clear of several frames is handled with RemoveCel command.
|
||||||
Timeline::Range range = App::instance()->getMainWindow()->getTimeline()->range();
|
Timeline::Range range = App::instance()->getMainWindow()->getTimeline()->range();
|
||||||
if (range.enabled()) {
|
if (range.enabled() && (range.layers() > 1 || range.frames() > 1)) {
|
||||||
Command* subCommand = CommandsModule::instance()
|
Command* subCommand = CommandsModule::instance()
|
||||||
->getCommandByName(CommandId::RemoveCel);
|
->getCommandByName(CommandId::RemoveCel);
|
||||||
context->executeCommand(subCommand);
|
context->executeCommand(subCommand);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user