From 90508bd3c9265b81a5bb1bb8bd56a3e5932a09f5 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 29 Aug 2016 11:18:04 +0200 Subject: [PATCH] FIRE-19956: Add button to clear all temporary derendered objects to the blacklist floater --- indra/newview/fsfloaterassetblacklist.cpp | 9 ++++++++- indra/newview/fsfloaterassetblacklist.h | 1 + indra/newview/llviewerobjectlist.cpp | 4 ++-- indra/newview/llviewerobjectlist.h | 2 +- .../default/xui/de/floater_fs_asset_blacklist.xml | 3 ++- .../default/xui/en/floater_fs_asset_blacklist.xml | 13 +++++++++++-- 6 files changed, 25 insertions(+), 7 deletions(-) diff --git a/indra/newview/fsfloaterassetblacklist.cpp b/indra/newview/fsfloaterassetblacklist.cpp index 072f848c98..d46e8254d7 100644 --- a/indra/newview/fsfloaterassetblacklist.cpp +++ b/indra/newview/fsfloaterassetblacklist.cpp @@ -34,6 +34,7 @@ #include "llfiltereditor.h" #include "llfloaterreg.h" #include "llviewercontrol.h" +#include "llviewerobjectlist.h" FSFloaterAssetBlacklist::FSFloaterAssetBlacklist(const LLSD& key) @@ -60,6 +61,7 @@ BOOL FSFloaterAssetBlacklist::postBuild() mResultList->setFilterColumn(0); childSetAction("remove_btn", boost::bind(&FSFloaterAssetBlacklist::onRemoveBtn, this)); + childSetAction("remove_temp_btn", boost::bind(&FSFloaterAssetBlacklist::onRemoveAllTemporaryBtn, this)); childSetAction("close_btn", boost::bind(&FSFloaterAssetBlacklist::onCloseBtn, this)); getChild("filter_input")->setCommitCallback(boost::bind(&FSFloaterAssetBlacklist::onFilterEdit, this, _2)); @@ -180,8 +182,8 @@ void FSFloaterAssetBlacklist::onBlacklistChanged(const LLSD& data, FSAssetBlackl for (LLSD::array_const_iterator it = data.beginArray(); it != data.endArray(); ++it) { mResultList->deleteItems(*it); - mResultList->updateLayout(); } + mResultList->updateLayout(); } } @@ -190,6 +192,11 @@ void FSFloaterAssetBlacklist::onRemoveBtn() removeElements(); } +void FSFloaterAssetBlacklist::onRemoveAllTemporaryBtn() +{ + gObjectList.resetDerenderList(true); +} + void FSFloaterAssetBlacklist::onCloseBtn() { closeFloater(); diff --git a/indra/newview/fsfloaterassetblacklist.h b/indra/newview/fsfloaterassetblacklist.h index 7b2ae232a8..02160daf1a 100644 --- a/indra/newview/fsfloaterassetblacklist.h +++ b/indra/newview/fsfloaterassetblacklist.h @@ -51,6 +51,7 @@ public: protected: void onRemoveBtn(); + void onRemoveAllTemporaryBtn(); void onCloseBtn(); void onFilterEdit(const std::string& search_string); void onBlacklistChanged(const LLSD& data, FSAssetBlacklist::eBlacklistOperation op); diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 9904e51906..a7f57816a8 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -2422,10 +2422,10 @@ LLDebugBeacon::~LLDebugBeacon() } // Helper function to purge the internal list of derendered objects on teleport. -void LLViewerObjectList::resetDerenderList() +void LLViewerObjectList::resetDerenderList(bool force /*= false*/) { static LLCachedControl fsTempDerenderUntilTeleport(gSavedSettings, "FSTempDerenderUntilTeleport"); - if (!fsTempDerenderUntilTeleport) + if (!fsTempDerenderUntilTeleport && !force) { return; } diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 96bbf4a4b1..51753f55f8 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -252,7 +252,7 @@ private: private: std::map< LLUUID, bool > mDerendered; public: - void resetDerenderList(); + void resetDerenderList(bool force = false); void addDerenderedItem( LLUUID const &, bool ); void removeDerenderedItem( LLUUID const & ); // diff --git a/indra/newview/skins/default/xui/de/floater_fs_asset_blacklist.xml b/indra/newview/skins/default/xui/de/floater_fs_asset_blacklist.xml index b25ef9bbed..ef4fb0f1b5 100644 --- a/indra/newview/skins/default/xui/de/floater_fs_asset_blacklist.xml +++ b/indra/newview/skins/default/xui/de/floater_fs_asset_blacklist.xml @@ -32,6 +32,7 @@ -