From b877e80d70875ff01ee0f522b775b766838d7404 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 13 Oct 2023 20:08:02 +0300 Subject: SL-20464 Don't allow enetring non-unicode material name --- indra/newview/llmaterialeditor.cpp | 6 +++++- indra/newview/lltoastalertpanel.cpp | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index be6f8d72e5..6b70b40860 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1571,7 +1571,11 @@ void LLMaterialEditor::onSaveAsMsgCallback(const LLSD& notification, const LLSD& } else { - LLNotificationsUtil::add("InvalidMaterialName"); + LLNotificationsUtil::add("InvalidMaterialName", LLSD(), LLSD(), [this](const LLSD& notification, const LLSD& response) + { + LLNotificationsUtil::add("SaveMaterialAs", LLSD().with("DESC", mMaterialName), LLSD(), + boost::bind(&LLMaterialEditor::onSaveAsMsgCallback, this, _1, _2)); + }); } } } diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index d35833fac9..8bf078477a 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -295,7 +295,8 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal mLineEditor->setText(edit_text_contents); std::string notif_name = mNotification->getName(); - if (("SaveOutfitAs" == notif_name) || ("SaveSettingAs" == notif_name) || ("CreateLandmarkFolder" == notif_name) || ("CreateSubfolder" == notif_name)) + if (("SaveOutfitAs" == notif_name) || ("SaveSettingAs" == notif_name) || ("CreateLandmarkFolder" == notif_name) || + ("CreateSubfolder" == notif_name) || ("SaveMaterialAs" == notif_name)) { mLineEditor->setPrevalidate(&LLTextValidate::validateASCII); } -- cgit v1.2.3