From 21809adba021ffdfef34ec5d39ae63bfb978f51a Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 1 Jun 2020 16:31:27 +0200 Subject: [PATCH 1/3] FIRE-29649: Crash when opening spellcheck settings --- indra/llui/llspellcheck.cpp | 10 +++++++++- indra/llui/llspellcheck.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp index 990e651853..63a86fc0b2 100644 --- a/indra/llui/llspellcheck.cpp +++ b/indra/llui/llspellcheck.cpp @@ -50,7 +50,7 @@ LLSpellChecker::LLSpellChecker() : mHunspell(NULL) { // Load initial dictionary information - refreshDictionaryMap(); + //refreshDictionaryMap(); // FIRE-29649: Crash when opening spellcheck settings } LLSpellChecker::~LLSpellChecker() @@ -58,6 +58,14 @@ LLSpellChecker::~LLSpellChecker() delete mHunspell; } +// FIRE-29649: Crash when opening spellcheck settings +void LLSpellChecker::initSingleton() +{ + // Load initial dictionary information + refreshDictionaryMap(); +} +// + bool LLSpellChecker::checkSpelling(const std::string& word) const { if ( (!mHunspell) || (word.length() < 3) || (0 != mHunspell->spell(word.c_str())) ) diff --git a/indra/llui/llspellcheck.h b/indra/llui/llspellcheck.h index f1964cc091..36628780a3 100644 --- a/indra/llui/llspellcheck.h +++ b/indra/llui/llspellcheck.h @@ -47,6 +47,7 @@ public: protected: void addToDictFile(const std::string& dict_path, const std::string& word); void initHunspell(const std::string& dict_language); + void initSingleton(); // FIRE-29649: Crash when opening spellcheck settings public: typedef std::list dict_list_t; From 17e39d3fd9ef508a51d169ab73ae64c09cc98fac Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 1 Jun 2020 16:55:06 +0200 Subject: [PATCH 2/3] FIRE-29642: Show 0m as distance for HUD attachments in area search --- indra/newview/fsareasearch.cpp | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/indra/newview/fsareasearch.cpp b/indra/newview/fsareasearch.cpp index 1a7e65633f..065ced1660 100644 --- a/indra/newview/fsareasearch.cpp +++ b/indra/newview/fsareasearch.cpp @@ -81,6 +81,18 @@ const F32 MIN_DISTANCE_MOVED = 1.0f; const F32 REQUEST_TIMEOUT = 30.0f; +F32 calculateObjectDistance(LLVector3d agent_pos, LLViewerObject* object) +{ + if (object->isHUDAttachment()) + { + return 0.f; + } + else + { + return dist_vec(agent_pos, object->getPositionGlobal()); + } +} + class FSAreaSearch::FSParcelChangeObserver : public LLParcelObserver { public: @@ -624,8 +636,8 @@ void FSAreaSearch::requestObjectProperties(const std::vector& request_list, msg->newMessageFast(_PREHASH_ObjectDeselect); } msg->nextBlockFast(_PREHASH_AgentData); - msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->addUUIDFast(_PREHASH_AgentID, gAgentID); + msg->addUUIDFast(_PREHASH_SessionID, gAgentSessionID); select_count++; start_new_message = false; } @@ -777,7 +789,7 @@ void FSAreaSearch::matchObject(FSObjectProperties& details, LLViewerObject* obje if (mFilterDistance) { - S32 distance = dist_vec(mPanelList->getAgentLastPosition(), objectp->getPositionGlobal());// used mAgentLastPosition instead of gAgent->getPositionGlobal for performace + S32 distance = (S32)calculateObjectDistance(mPanelList->getAgentLastPosition(), objectp);// used mAgentLastPosition instead of gAgent->getPositionGlobal for performace if (!(distance >= mFilterDistanceMin && distance <= mFilterDistanceMax)) { return; @@ -989,7 +1001,7 @@ void FSAreaSearch::matchObject(FSObjectProperties& details, LLViewerObject* obje row_params.value = object_id.asString(); cell_params.column = "distance"; - cell_params.value = llformat("%1.0f m", dist_vec(mPanelList->getAgentLastPosition(), objectp->getPositionGlobal())); // used mAgentLastPosition instead of gAgent->getPositionGlobal for performace + cell_params.value = llformat("%1.0f m", calculateObjectDistance(mPanelList->getAgentLastPosition(), objectp)); // used mAgentLastPosition instead of gAgent->getPositionGlobal for performace row_params.columns.add(cell_params); cell_params.column = "name"; @@ -1471,7 +1483,7 @@ void FSPanelAreaSearchList::updateScrollList() { if (agent_moved && distance_column) { - item->getColumn(distance_column->mIndex)->setValue(LLSD(llformat("%1.0f m", dist_vec(current_agent_position, objectp->getPositionGlobal())))); + item->getColumn(distance_column->mIndex)->setValue(LLSD(llformat("%1.0f m", calculateObjectDistance(current_agent_position, objectp)))); } } } @@ -1614,7 +1626,7 @@ bool FSPanelAreaSearchList::onContextMenuItemEnable(const LLSD& userdata) { LLUUID object_id = mResultList->getFirstSelected()->getUUID(); LLViewerObject* objectp = gObjectList.findObject(object_id); - return (objectp && dist_vec_squared(gAgent.getPositionGlobal(), objectp->getPositionGlobal()) < gAgentCamera.mDrawDistance * gAgentCamera.mDrawDistance); + return (objectp && calculateObjectDistance(gAgent.getPositionGlobal(), objectp) < gAgentCamera.mDrawDistance); } else { @@ -1978,8 +1990,8 @@ void FSPanelAreaSearchList::sitOnObject(FSObjectProperties& details, LLViewerObj { gMessageSystem->newMessageFast(_PREHASH_AgentRequestSit); gMessageSystem->nextBlockFast(_PREHASH_AgentData); - gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgentID); + gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgentSessionID); gMessageSystem->nextBlockFast(_PREHASH_TargetObject); gMessageSystem->addUUIDFast(_PREHASH_TargetID, objectp->mID); gMessageSystem->addVector3Fast(_PREHASH_Offset, LLVector3::zero); From 1af3bd238ced7b4183c43dae94982190706ec3d3 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 1 Jun 2020 16:57:56 +0200 Subject: [PATCH 3/3] Fix cut-off labels on area search floater --- indra/newview/skins/default/xui/en/floater_fs_area_search.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/skins/default/xui/en/floater_fs_area_search.xml b/indra/newview/skins/default/xui/en/floater_fs_area_search.xml index 4c67afe116..722ea7d415 100644 --- a/indra/newview/skins/default/xui/en/floater_fs_area_search.xml +++ b/indra/newview/skins/default/xui/en/floater_fs_area_search.xml @@ -308,6 +308,7 @@ name="only_list" height="15" follows="top|left" + right="-5" left="5"> Only list objects that are: @@ -541,6 +542,7 @@ height="15" top_pad="5" follows="top|left" + right="-5" left="5"> Exclude objects that are: