summaryrefslogtreecommitdiff
path: root/indra/newview/llavataractions.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-08-10 19:03:12 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-08-10 19:03:12 +0300
commitc4335939d90346a778eb18acb7611135742231df (patch)
tree7becafc166f3afd18e036a92fb3eb7e96be3f3eb /indra/newview/llavataractions.cpp
parentdd4156251b0ad18f283d1b79a692c8a4a76c0900 (diff)
SL-17925 Fix SLURL based creation of picks and classifieds
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r--indra/newview/llavataractions.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 112a2f6624..25ba7c365f 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -63,12 +63,14 @@
#include "llnotificationsutil.h" // for LLNotificationsUtil
#include "llpaneloutfitedit.h"
#include "llpanelprofile.h"
+#include "llparcel.h"
#include "llrecentpeople.h"
#include "lltrans.h"
#include "llviewercontrol.h"
#include "llviewerobjectlist.h"
#include "llviewermessage.h" // for handle_lure
#include "llviewernetwork.h" //LLGridManager
+#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "lltrans.h"
#include "llcallingcard.h"
@@ -367,6 +369,34 @@ void LLAvatarActions::showPick(const LLUUID& avatar_id, const LLUUID& pick_id)
}
// static
+void LLAvatarActions::createPick()
+{
+ LLFloaterProfile* profilefloater = dynamic_cast<LLFloaterProfile*>(LLFloaterReg::showInstance("profile", LLSD().with("id", gAgent.getID())));
+ LLViewerRegion* region = gAgent.getRegion();
+ if (profilefloater && region)
+ {
+ LLPickData data;
+ data.pos_global = gAgent.getPositionGlobal();
+ data.sim_name = region->getName();
+
+ LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
+ if (parcel)
+ {
+ data.name = parcel->getName();
+ data.desc = parcel->getDesc();
+ data.snapshot_id = parcel->getSnapshotID();
+ data.parcel_id = parcel->getID();
+ }
+ else
+ {
+ data.name = region->getName();
+ }
+
+ profilefloater->createPick(data);
+ }
+}
+
+// static
bool LLAvatarActions::isPickTabSelected(const LLUUID& avatar_id)
{
if (avatar_id.notNull())
@@ -406,6 +436,16 @@ void LLAvatarActions::showClassified(const LLUUID& avatar_id, const LLUUID& clas
}
}
+// static
+void LLAvatarActions::createClassified()
+{
+ LLFloaterProfile* profilefloater = dynamic_cast<LLFloaterProfile*>(LLFloaterReg::showInstance("profile", LLSD().with("id", gAgent.getID())));
+ if (profilefloater)
+ {
+ profilefloater->createClassified();
+ }
+}
+
//static
bool LLAvatarActions::profileVisible(const LLUUID& avatar_id)
{