From 569b6c18c34db0504ab71b0c4600aea67abb21d5 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Tue, 10 Dec 2024 21:25:43 +0200 Subject: [PATCH] loosen restrictions on clip names - Allow multiple clips to share a name as long as they're all on different outputs. --- src/deluge/gui/ui/rename/rename_clip_ui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/deluge/gui/ui/rename/rename_clip_ui.cpp b/src/deluge/gui/ui/rename/rename_clip_ui.cpp index b2f4c1756f..2300ca350d 100644 --- a/src/deluge/gui/ui/rename/rename_clip_ui.cpp +++ b/src/deluge/gui/ui/rename/rename_clip_ui.cpp @@ -84,10 +84,10 @@ ActionResult RenameClipUI::buttonAction(deluge::hid::Button b, bool on, bool inC void RenameClipUI::enterKeyPress() { - // If actually changing it... + // Don't allow duplicate names on clips of a single output. if (!clip->name.equalsCaseIrrespective(&enteredText)) { - // don't let user set a name that is a duplicate of another name that has been set for another clip - if (currentSong->getClipFromName(&enteredText)) { + Clip* other = currentSong->getClipFromName(&enteredText); + if (other && other->output == clip->output) { display->displayPopup(deluge::l10n::get(deluge::l10n::String::STRING_FOR_DUPLICATE_NAMES)); return; }