mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-19 06:40:42 +00:00
Fix undo of a new ref layer
This commit is contained in:
parent
b4747b3ed6
commit
492e71918f
@ -21,6 +21,7 @@
|
||||
#include "app/transaction.h"
|
||||
#include "app/ui/main_window.h"
|
||||
#include "app/ui/status_bar.h"
|
||||
#include "app/ui_context.h"
|
||||
#include "doc/layer.h"
|
||||
#include "doc/primitives.h"
|
||||
#include "doc/sprite.h"
|
||||
@ -136,8 +137,11 @@ void NewLayerCommand::onExecute(Context* context)
|
||||
context->executeCommand(openFile, params);
|
||||
|
||||
// The user have selected another document.
|
||||
if (oldActiveDocument != context->activeDocument())
|
||||
if (oldActiveDocument != context->activeDocument()) {
|
||||
pasteDoc = context->activeDocument();
|
||||
static_cast<UIContext*>(context)
|
||||
->setActiveDocument(oldActiveDocument);
|
||||
}
|
||||
}
|
||||
|
||||
// If params specify to ask the user about the name...
|
||||
|
Loading…
x
Reference in New Issue
Block a user