mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-30 04:20:23 +00:00
Fix pasting text on empty cel when the timeline range is enabled
Bug report: https://community.aseprite.org/t/4489
This commit is contained in:
parent
d5f0e3189c
commit
1bb126fade
@ -1,5 +1,5 @@
|
|||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2019 Igara Studio S.A.
|
// Copyright (C) 2019-2020 Igara Studio S.A.
|
||||||
// Copyright (C) 2001-2018 David Capello
|
// Copyright (C) 2001-2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
@ -19,6 +19,7 @@
|
|||||||
#include "app/ui/drop_down_button.h"
|
#include "app/ui/drop_down_button.h"
|
||||||
#include "app/ui/editor/editor.h"
|
#include "app/ui/editor/editor.h"
|
||||||
#include "app/ui/font_popup.h"
|
#include "app/ui/font_popup.h"
|
||||||
|
#include "app/ui/timeline/timeline.h"
|
||||||
#include "app/util/freetype_utils.h"
|
#include "app/util/freetype_utils.h"
|
||||||
#include "base/bind.h"
|
#include "base/bind.h"
|
||||||
#include "base/fs.h"
|
#include "base/fs.h"
|
||||||
@ -190,6 +191,12 @@ void PasteTextCommand::onExecute(Context* ctx)
|
|||||||
false, 0));
|
false, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO we don't support pasting text in multiple cels at the
|
||||||
|
// moment, so we clear the range here (same as in
|
||||||
|
// clipboard::paste())
|
||||||
|
if (auto timeline = App::instance()->timeline())
|
||||||
|
timeline->clearAndInvalidateRange();
|
||||||
|
|
||||||
editor->pasteImage(image.get());
|
editor->pasteImage(image.get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2019 Igara Studio S.A.
|
// Copyright (C) 2019-2020 Igara Studio S.A.
|
||||||
// Copyright (C) 2001-2018 David Capello
|
// Copyright (C) 2001-2018 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
@ -396,8 +396,9 @@ void paste(Context* ctx, const bool interactive)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (current_editor && interactive) {
|
if (current_editor && interactive) {
|
||||||
// TODO we don't support pasting in multiple cels at the moment,
|
// TODO we don't support pasting in multiple cels at the
|
||||||
// so we clear the range here.
|
// moment, so we clear the range here (same as in
|
||||||
|
// PasteTextCommand::onExecute())
|
||||||
App::instance()->timeline()->clearAndInvalidateRange();
|
App::instance()->timeline()->clearAndInvalidateRange();
|
||||||
|
|
||||||
// Change to MovingPixelsState
|
// Change to MovingPixelsState
|
||||||
|
Loading…
x
Reference in New Issue
Block a user