From 0b6c9c50c3049eb75a0305376d067bf8982e184d Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Mon, 21 Aug 2023 23:55:00 +0300 Subject: SL-20173 show warning notification when trying to add invalid files as local texture --- indra/newview/lllocalbitmaps.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/lllocalbitmaps.cpp') diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index de8db69e19..72ef365a6d 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -982,6 +982,9 @@ bool LLLocalBitmapMgr::checkTextureDimensions(std::string filename) LLImageDimensionsInfo image_info; if (!image_info.load(filename,codec)) { + LLSD args; + args["NAME"] = gDirUtilp->getBaseFileName(filename); + LLNotificationsUtil::add(image_info.getWarningName(), args); return false; } -- cgit v1.2.3 From 87f496cf7c1c71510e4cb995661f8da5691746da Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 12 Sep 2023 15:01:56 +0300 Subject: SL-20173 show notification when file is empty --- indra/newview/lllocalbitmaps.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/lllocalbitmaps.cpp') diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 72ef365a6d..f435506cff 100644 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -984,7 +984,11 @@ bool LLLocalBitmapMgr::checkTextureDimensions(std::string filename) { LLSD args; args["NAME"] = gDirUtilp->getBaseFileName(filename); - LLNotificationsUtil::add(image_info.getWarningName(), args); + if (!image_info.getWarningName().empty()) + { + args["REASON"] = LLTrans::getString(image_info.getWarningName()); + } + LLNotificationsUtil::add("CannotUploadTexture", args); return false; } @@ -1000,6 +1004,7 @@ bool LLLocalBitmapMgr::checkTextureDimensions(std::string filename) LLSD notif_args; notif_args["REASON"] = mImageLoadError; + notif_args["NAME"] = gDirUtilp->getBaseFileName(filename); LLNotificationsUtil::add("CannotUploadTexture", notif_args); return false; -- cgit v1.2.3