From 59b10c2cbcb3bbe8b88cd9c7dba17b0e28d56a9b Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 22 Jun 2020 20:47:04 +0300
Subject: [PATCH] SL-12335 Show parcel owner's name and icon in landmarks

---
 indra/newview/llpanellandmarkinfo.cpp | 14 ++++++++++----
 indra/newview/llremoteparcelrequest.h |  2 +-
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 8a6a9f1fcd5..1992374c359 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -103,7 +103,6 @@ void LLPanelLandmarkInfo::resetLocation()
 	mLandmarkTitleEditor->setText(LLStringUtil::null);
 	mNotesEditor->setText(LLStringUtil::null);
 
-    mParcelOwner->setVisible(FALSE);
     getChild<LLUICtrl>("parcel_owner_label")->setVisible(FALSE);
 }
 
@@ -162,7 +161,6 @@ void LLPanelLandmarkInfo::setInfoType(EInfoType type)
 				mLandmarkTitleEditor->setText(name);
 			}
 
-            mParcelOwner->setVisible(TRUE);
             getChild<LLUICtrl>("parcel_owner_label")->setVisible(TRUE);
             LLUUID owner_id = parcel->getOwnerID();
             if (owner_id.notNull())
@@ -236,11 +234,19 @@ void LLPanelLandmarkInfo::processParcelInfo(const LLParcelData& parcel_data)
 
     if (parcel_data.owner_id.notNull())
     {
-        // not suported and ivisible due to missing isGroupOwned flag
+        if (parcel_data.flags & 0x4) // depends onto DRTSIM-453
+        {
+            std::string owner_name = LLSLURL("group", parcel_data.owner_id, "inspect").getSLURLString();
+            mParcelOwner->setText(owner_name);
+        }
+        else
+        {
+            std::string owner_name = LLSLURL("agent", parcel_data.owner_id, "inspect").getSLURLString();
+            mParcelOwner->setText(owner_name);
+        }
     }
     else
     {
-        mParcelOwner->setVisible(TRUE);
         mParcelOwner->setText(getString("public"));
         getChild<LLUICtrl>("parcel_owner_label")->setVisible(FALSE);
     }
diff --git a/indra/newview/llremoteparcelrequest.h b/indra/newview/llremoteparcelrequest.h
index 5b0d1891378..70c117be44e 100644
--- a/indra/newview/llremoteparcelrequest.h
+++ b/indra/newview/llremoteparcelrequest.h
@@ -45,7 +45,7 @@ struct LLParcelData
 	std::string	desc;
 	S32			actual_area;
 	S32			billable_area;
-	U8			flags;
+	U8			flags; // group owned, maturity
 	F32			global_x;
 	F32			global_y;
 	F32			global_z;
-- 
GitLab