diff options
author | Rider Linden <rider@lindenlab.com> | 2024-10-14 16:42:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-14 16:42:57 -0700 |
commit | 4b0fa1e3d1567ea9616fd9430cf5cb91c7825133 (patch) | |
tree | 5b4cdd96d46b2ddafa552ac84553ce6e94a89380 /indra/newview | |
parent | a2899a3c6cc859dfde4d9692b0dde6e778184dc4 (diff) | |
parent | 82ffb6e943224d5584ba00f922e4cbc5b0fa62af (diff) |
Merge pull request #2849 from secondlife/rider/world_map_flags
New flags on ScriptTeleportRequest message.
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llfloaterworldmap.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 14 |
2 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index dda7266220..4674cd68b6 100755 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -486,8 +486,11 @@ void LLFloaterWorldMap::onOpen(const LLSD& key) const LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); LLInventoryModelBackgroundFetch::instance().start(landmark_folder_id); - mLocationEditor->setFocus( true); - gFocusMgr.triggerFocusFlash(); + if (hasFocus()) + { + mLocationEditor->setFocus( true); + gFocusMgr.triggerFocusFlash(); + } buildAvatarIDList(); buildLandmarkIDLists(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c4ea8db3cd..33d9b5eb67 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6643,7 +6643,6 @@ void process_initiate_download(LLMessageSystem* msg, void**) (void**)new std::string(viewer_filename)); } - void process_script_teleport_request(LLMessageSystem* msg, void**) { if (!gSavedSettings.getBOOL("ScriptsCanShowUI")) return; @@ -6657,6 +6656,11 @@ void process_script_teleport_request(LLMessageSystem* msg, void**) msg->getString("Data", "SimName", sim_name); msg->getVector3("Data", "SimPosition", pos); msg->getVector3("Data", "LookAt", look_at); + U32 flags = (BEACON_SHOW_MAP | BEACON_FOCUS_MAP); + if (msg->has("Options")) + { + msg->getU32("Options", "Flags", flags); + } LLFloaterWorldMap* instance = LLFloaterWorldMap::getInstance(); if(instance) @@ -6667,7 +6671,13 @@ void process_script_teleport_request(LLMessageSystem* msg, void**) << LL_ENDL; instance->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]); - LLFloaterReg::showInstance("world_map", "center"); + if (flags & BEACON_SHOW_MAP) + { + bool old_auto_focus = instance->getAutoFocus(); + instance->setAutoFocus(flags & BEACON_FOCUS_MAP); + instance->openFloater("center"); + instance->setAutoFocus(old_auto_focus); + } } // remove above two lines and replace with below line |