FIRE-19956: Add button to clear all temporary derendered objects to the blacklist floater

meow-7.2.2
Ansariel 2016-08-29 11:18:04 +02:00
parent 2cdc81c61a
commit 90508bd3c9
6 changed files with 25 additions and 7 deletions

View File

@ -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<LLFilterEditor>("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();

View File

@ -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);

View File

@ -2422,10 +2422,10 @@ LLDebugBeacon::~LLDebugBeacon()
}
// <FS:ND> Helper function to purge the internal list of derendered objects on teleport.
void LLViewerObjectList::resetDerenderList()
void LLViewerObjectList::resetDerenderList(bool force /*= false*/)
{
static LLCachedControl<bool> fsTempDerenderUntilTeleport(gSavedSettings, "FSTempDerenderUntilTeleport");
if (!fsTempDerenderUntilTeleport)
if (!fsTempDerenderUntilTeleport && !force)
{
return;
}

View File

@ -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 & );
// </FS:ND>

View File

@ -32,6 +32,7 @@
<columns name="date" label="Datum"/>
<columns name="permanent" label="Permanent"/>
</fs_scroll_list>
<button name="remove_btn" label="Ausgewählte Objekte von Blacklist entfernen" width="290"/>
<button name="remove_btn" label="Ausgewählte Objekte entfernen" width="210"/>
<button name="remove_temp_btn" label="Alle Temporären entfernen" width="180"/>
<button name="close_btn" label="Schließen"/>
</floater>

View File

@ -104,13 +104,22 @@
</fs_scroll_list>
<button
name="remove_btn"
label="Remove selected items from blacklist"
label="Remove selected"
font="SansSerif"
height="24"
width="280"
width="150"
left="4"
bottom="-6"
follows="left|bottom"/>
<button
name="remove_temp_btn"
label="Clear temporary"
font="SansSerif"
height="24"
width="150"
left_pad="10"
bottom="-6"
follows="left|bottom"/>
<button
name="close_btn"
label="Close"