summaryrefslogtreecommitdiff
path: root/indra/llui/llurlaction.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-08-06 16:05:19 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-08-06 16:05:19 +0300
commitce9d66cdd18c58c3b26fbebde633ae00732d7f9f (patch)
treefdbc5a913c62265f95e610819637e096f0f85339 /indra/llui/llurlaction.cpp
parent514b658fde13bb0c0ec862b081eeebf47bace70d (diff)
parent0f68bcd46ca3f2babf94303b80e2be006e4693ae (diff)
Merge branch develop into 2025.06
# Conflicts: # indra/newview/llvoavatar.cpp
Diffstat (limited to 'indra/llui/llurlaction.cpp')
-rw-r--r--indra/llui/llurlaction.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/llui/llurlaction.cpp b/indra/llui/llurlaction.cpp
index d017f536f0..fdae22cfa1 100644
--- a/indra/llui/llurlaction.cpp
+++ b/indra/llui/llurlaction.cpp
@@ -30,6 +30,7 @@
#include "llview.h"
#include "llwindow.h"
#include "llurlregistry.h"
+#include "v3dmath.h"
// global state for the callback functions
@@ -128,6 +129,23 @@ void LLUrlAction::showLocationOnMap(std::string url)
}
}
+void LLUrlAction::showParcelOnMap(std::string url)
+{
+ LLSD path_array = LLURI(url).pathArray();
+ auto path_parts = path_array.size();
+
+ if (path_parts < 3) // no parcel id
+ {
+ LL_WARNS() << "Global coordinates are missing in url: [" << url << "]" << LL_ENDL;
+ return;
+ }
+
+ LLVector3d parcel_pos = LLUrlEntryParcel::getParcelPos(LLUUID(LLURI::unescape(path_array[2])));
+ std::ostringstream pos;
+ pos << parcel_pos.mdV[VX] << '/' << parcel_pos.mdV[VY] << '/' << parcel_pos.mdV[VZ];
+ executeSLURL("secondlife:///app/worldmap_global/" + pos.str());
+}
+
void LLUrlAction::copyURLToClipboard(std::string url)
{
LLView::getWindow()->copyTextToClipboard(utf8str_to_wstring(url));