From e193891df32d48f85745532318f232cea77b1048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Capello?= Date: Tue, 25 Mar 2025 11:03:31 -0300 Subject: [PATCH] Use "Copy" suffix to name duplicated slices --- src/app/commands/cmd_duplicate_slice.cpp | 2 +- src/app/util/clipboard.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/commands/cmd_duplicate_slice.cpp b/src/app/commands/cmd_duplicate_slice.cpp index 36a56d1fd..810061606 100644 --- a/src/app/commands/cmd_duplicate_slice.cpp +++ b/src/app/commands/cmd_duplicate_slice.cpp @@ -90,7 +90,7 @@ void DuplicateSliceCommand::onExecute(Context* context) doc->notifyBeforeSlicesDuplication(); for (auto* s : selectedSlices) { Slice* slice = new Slice(*s); - slice->setName(get_unique_slice_name(sprite, s->name())); + slice->setName(slice->name() + " Copy"); // Offset a bit the duplicated slice to avoid overlapping offset(slice, 2, 2); diff --git a/src/app/util/clipboard.cpp b/src/app/util/clipboard.cpp index c8f5fb6af..58f70bdcf 100644 --- a/src/app/util/clipboard.cpp +++ b/src/app/util/clipboard.cpp @@ -827,7 +827,7 @@ void Clipboard::paste(Context* ctx, const bool interactive, const gfx::Point* po editor->clearSlicesSelection(); for (auto& s : slices) { Slice* slice = new Slice(s); - slice->setName(get_unique_slice_name(dstSpr, s.name())); + slice->setName(slice->name() + " Copy"); tx(new cmd::AddSlice(dstSpr, slice)); editor->selectSlice(slice); }