From 3ae332ee358163a5808640bd2176f36fee792d01 Mon Sep 17 00:00:00 2001 From: Hecklezz Date: Thu, 5 Feb 2026 20:22:50 +1000 Subject: [PATCH] Fix FS AO NewAONameCantExist notification appearing when clicking cancel and a very minor refactor --- indra/newview/ao.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/indra/newview/ao.cpp b/indra/newview/ao.cpp index 23bf453c8f..7007707174 100644 --- a/indra/newview/ao.cpp +++ b/indra/newview/ao.cpp @@ -529,7 +529,7 @@ bool FloaterAO::newSetCallback(const LLSD& notification, const LLSD& response) { return false; } - else if ( + if ( !LLTextValidate::validateASCIIPrintableNoPipe.validate(new_set_name.getWString()) || // only allow ASCII newSetName.find_first_of(":|") != std::string::npos) // don't allow : or | { @@ -539,14 +539,14 @@ bool FloaterAO::newSetCallback(const LLSD& notification, const LLSD& response) return false; } - if (AOEngine::instance().getSetByName(newSetName)) - { - LLNotificationsUtil::add("NewAONameCantExist"); - return false; - } - if (option == 0) { + if (AOEngine::instance().getSetByName(newSetName)) + { + LLNotificationsUtil::add("NewAONameCantExist"); + return false; + } + AOEngine::instance().addSet(newSetName, [this](const LLUUID& new_cat_id) { reloading(true);