diff options
| -rw-r--r-- | indra/llcommon/indra_constants.h | 2 | ||||
| -rw-r--r-- | indra/llui/llfloater.h | 6 | ||||
| -rwxr-xr-x | indra/newview/llfloaterworldmap.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llviewermessage.cpp | 14 | ||||
| -rwxr-xr-x | scripts/messages/message_template.msg | 20 | ||||
| -rwxr-xr-x | scripts/messages/message_template.msg.sha1 | 2 | 
6 files changed, 36 insertions, 15 deletions
| diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h index d2de88ff0a..c6bdab007f 100644 --- a/indra/llcommon/indra_constants.h +++ b/indra/llcommon/indra_constants.h @@ -355,5 +355,7 @@ const U8 CLICK_ACTION_DISABLED = 8;  const U8 CLICK_ACTION_IGNORE = 9;  // DO NOT CHANGE THE SEQUENCE OF THIS LIST!! +constexpr U32 BEACON_SHOW_MAP  = 0x0001; +constexpr U32 BEACON_FOCUS_MAP = 0x0002;  #endif diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 9be2240f6f..eae2435117 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -377,6 +377,10 @@ public:      void            enableResizeCtrls(bool enable, bool width = true, bool height = true);      bool            isPositioning(LLFloaterEnums::EOpenPositioning p) const { return (p == mPositioning); } + +    void            setAutoFocus(bool focus) { mAutoFocus = focus; } // whether to automatically take focus when opened +    bool            getAutoFocus() const { return mAutoFocus; } +  protected:      void            applyControlsAndPosition(LLFloater* other); @@ -401,8 +405,6 @@ protected:      void            setExpandedRect(const LLRect& rect) { mExpandedRect = rect; } // size when not minimized      const LLRect&   getExpandedRect() const { return mExpandedRect; } -    void            setAutoFocus(bool focus) { mAutoFocus = focus; } // whether to automatically take focus when opened -    bool            getAutoFocus() const { return mAutoFocus; }      LLDragHandle*   getDragHandle() const { return mDragHandle; }      void            destroy(); // Don't call this directly.  You probably want to call closeFloater() diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 30ed723db6..a798ba31ee 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 1d4828fd33..e52a40ef85 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6610,7 +6610,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; @@ -6624,6 +6623,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) @@ -6634,7 +6638,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 diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg index 1450c111c2..70c2bdf53a 100755 --- a/scripts/messages/message_template.msg +++ b/scripts/messages/message_template.msg @@ -4370,14 +4370,18 @@ version 2.0  // ScriptTeleportRequest  // reliable  { -	ScriptTeleportRequest Low 195 Trusted Unencoded -	{ -		Data	Single -		{	ObjectName		Variable	1	} -		{	SimName			Variable	1	} -		{	SimPosition		LLVector3		} -		{	LookAt			LLVector3		} -	} +    ScriptTeleportRequest Low 195 Trusted Unencoded +    { +        Data	Single +        {   ObjectName      Variable	1	} +        {   SimName         Variable	1	} +        {   SimPosition     LLVector3		} +        {   LookAt          LLVector3		} +    } +    { +        Options Variable +        {   Flags           U32 } +    }  } diff --git a/scripts/messages/message_template.msg.sha1 b/scripts/messages/message_template.msg.sha1 index efa5f3cf48..eb436d0627 100755 --- a/scripts/messages/message_template.msg.sha1 +++ b/scripts/messages/message_template.msg.sha1 @@ -1 +1 @@ -d7915d67467e59287857630bd89bf9529d065199
\ No newline at end of file +b98fc0af5fa88601f5afa4f3c83f08188316e9a8
\ No newline at end of file | 
