From 379f97e15a16ae8a89656dcc95adeeb92315690c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Tue, 25 Feb 2020 03:26:33 -0500 Subject: [PATCH] Buncha small fixes, mainly from alchemy Update firestorm jira url Maintain sorting and and scroll position when refreshing region tracker Add missing CrashHostUrl setting And a buncha other tinies, probably a crash fix or two. --- indra/llui/llurlentry.cpp | 2 +- indra/newview/alfloaterregiontracker.cpp | 6 ++++++ indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llagentcamera.cpp | 12 ++++++------ indra/newview/llexperiencelog.cpp | 3 +++ indra/newview/llfloaterworldmap.cpp | 19 +++++++++---------- indra/newview/llmeshrepository.cpp | 2 +- .../xui/en-us/floater_region_tracker.xml | 3 ++- 8 files changed, 39 insertions(+), 19 deletions(-) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 1d7e6d4e6..18330a1bc 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -1575,7 +1575,7 @@ std::string LLUrlEntryJira::getUrl(const std::string &url) const (url.find("SV") != std::string::npos) ? "https://singularityviewer.atlassian.net/browse/%1%" : (url.find("FIRE") != std::string::npos) ? - "http://jira.phoenixviewer.com/browse/%1%" : + "https://jira.firestormviewer.com/browse/%1%" : "http://jira.secondlife.com/browse/%1%" ) % url).str(); } diff --git a/indra/newview/alfloaterregiontracker.cpp b/indra/newview/alfloaterregiontracker.cpp index cc58da211..f95967367 100644 --- a/indra/newview/alfloaterregiontracker.cpp +++ b/indra/newview/alfloaterregiontracker.cpp @@ -117,6 +117,9 @@ void ALFloaterRegionTracker::refresh() { saved_selected_values.push_back(item->getValue().asString()); } + S32 saved_scroll_pos = mRegionScrollList->getScrollPos(); + auto sort_column_name = mRegionScrollList->getSortColumnName(); + auto sort_asending = mRegionScrollList->getSortAscending(); mRegionScrollList->deleteAllItems(); const std::string& cur_region_name = gAgent.getRegion()->getName(); @@ -172,8 +175,11 @@ void ALFloaterRegionTracker::refresh() mRegionScrollList->addRow(row); } } + + mRegionScrollList->sortByColumn(sort_column_name, sort_asending); if (!saved_selected_values.empty()) mRegionScrollList->selectMultiple(saved_selected_values); + mRegionScrollList->setScrollPos(saved_scroll_pos); } BOOL ALFloaterRegionTracker::tick() diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 392182932..f1d5c93d8 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2556,6 +2556,17 @@ This should be as low as possible, but too low may break functionality 1 + CrashHostUrl + + Comment + A URL pointing to a crash report handler; overrides cluster negotiation to locate crash handler. + Persist + 1 + Type + String + Value + + AFKTimeout Comment diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 32c43c992..727a59f4b 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2512,13 +2512,13 @@ void LLAgentCamera::changeCameraToCustomizeAvatar() gAgent.sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START); gAgent.setCustomAnim(TRUE); gAgentAvatarp->startMotion(ANIM_AGENT_CUSTOMIZE); - } - LLMotion* turn_motion = gAgentAvatarp->findMotion(ANIM_AGENT_CUSTOMIZE); + LLMotion* turn_motion = gAgentAvatarp->findMotion(ANIM_AGENT_CUSTOMIZE); - if (turn_motion) - { - // delay camera animation long enough to play through turn animation - setAnimationDuration(turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP); + if (turn_motion) + { + // delay camera animation long enough to play through turn animation + setAnimationDuration(turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP); + } } } // diff --git a/indra/newview/llexperiencelog.cpp b/indra/newview/llexperiencelog.cpp index a421bc0df..9f47c721c 100644 --- a/indra/newview/llexperiencelog.cpp +++ b/indra/newview/llexperiencelog.cpp @@ -244,6 +244,9 @@ void LLExperienceLog::eraseExpired() bool LLExperienceLog::isExpired(const std::string& date) { + if (date.empty()) + return true; + S32 month, day, year = 0; S32 matched = sscanf(date.c_str(), "%d-%d-%d", &year, &month, &day); if (matched != 3) return false; diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 6d2ce45a7..e86ad2a18 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -515,7 +515,7 @@ void LLFloaterWorldMap::draw() } else { - if (mCompletingRegionName != "") + if (!mCompletingRegionName.empty()) { F64 seconds = LLTimer::getElapsedSeconds(); double value = fmod(seconds, 2); @@ -1097,7 +1097,7 @@ void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui) } //Singu Note: Don't do this. It basically 'eats' the first click onto void space if the previous tracked target was a valid sim. //LLWorldMap::getInstance()->cancelTracking(); - mCompletingRegionName = ""; + mCompletingRegionName.clear(); } @@ -1648,7 +1648,7 @@ void LLFloaterWorldMap::flyToAvatar() void LLFloaterWorldMap::updateSims(bool found_null_sim) { - if (mCompletingRegionName == "") + if (mCompletingRegionName.empty()) { return; } @@ -1663,13 +1663,13 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) std::vector > sim_info_vec(LLWorldMap::getInstance()->getRegionMap().begin(), LLWorldMap::getInstance()->getRegionMap().end()); std::sort(sim_info_vec.begin(), sim_info_vec.end(), SortRegionNames()); - for (std::vector >::const_iterator it = sim_info_vec.begin(); it != sim_info_vec.end(); ++it) + for (const auto& sim_info_pair : sim_info_vec) { - LLSimInfo* info = it->second; + LLSimInfo* info = sim_info_pair.second; std::string sim_name_lower = info->getName(); LLStringUtil::toLower(sim_name_lower); - if (sim_name_lower.substr(0, mCompletingRegionName) != std::string::npos) + if (sim_name_lower.find(mCompletingRegionName) != std::string::npos) { if (sim_name_lower == mCompletingRegionName) { @@ -1687,7 +1687,7 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim) if (found_null_sim || match.isDefined()) { - mCompletingRegionName = ""; + mCompletingRegionName.clear(); } if (num_results > 0) @@ -1727,10 +1727,9 @@ void LLFloaterWorldMap::onCommitSearchResult() } LLStringUtil::toLower(sim_name); - std::map::const_iterator it; - for (it = LLWorldMap::getInstance()->getRegionMap().begin(); it != LLWorldMap::getInstance()->getRegionMap().end(); ++it) + for (auto map_pair : LLWorldMap::getInstance()->getRegionMap()) { - LLSimInfo* info = it->second; + LLSimInfo* info = map_pair.second; if (info->isName(sim_name)) { diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index a21a500aa..328c04087 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1913,7 +1913,7 @@ S32 LLMeshRepository::getActualMeshLOD(LLSD& header, S32 lod) { lod = llclamp(lod, 0, 3); - S32 version = header["version"]; + S32 version = header["version"].asInteger(); if (header.has("404") || version > MAX_MESH_VERSION) { diff --git a/indra/newview/skins/default/xui/en-us/floater_region_tracker.xml b/indra/newview/skins/default/xui/en-us/floater_region_tracker.xml index f6f6b1330..39d46984e 100644 --- a/indra/newview/skins/default/xui/en-us/floater_region_tracker.xml +++ b/indra/newview/skins/default/xui/en-us/floater_region_tracker.xml @@ -66,7 +66,8 @@ multi_select="true" draw_heading="true" column_padding="0" - search_column="0"> + search_column="0" + sort_column="0">