From b23feb2c623df8a58a52afb5fd4e5806a630d3d4 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 9 Feb 2021 23:00:44 +0200
Subject: [PATCH] SL-14797 Do not allow creation of landmarks nor folders in
 library

---
 indra/newview/llpanellandmarks.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 46c23961f4b..6e8eac19fcd 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -1044,8 +1044,12 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
 			// ... but except Received folder
 			return !isReceivedFolderSelected();
 		}
+		if (mCurrentSelectedList == mLibraryInventoryPanel)
+		{
+			return false;
+		}
 		//"Add a folder" is enabled by default (case when My Landmarks is empty)
-		else return true;
+		return true;
 	}
 	else if("create_pick" == command_name)
 	{
@@ -1066,6 +1070,10 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const
         {
             return false;
         }
+        if (mCurrentSelectedList == mLibraryInventoryPanel)
+        {
+            return false;
+        }
         LLFolderViewModelItemInventory* view_model = getCurSelectedViewModelItem();
         if (!view_model || view_model->getInventoryType() != LLInventoryType::IT_CATEGORY)
         {
-- 
GitLab