summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 382569fa3a..27f97ad26f 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -33,6 +33,7 @@
#include "llagentwearables.h"
#include "llappearancemgr.h"
#include "llavataractions.h"
+#include "llclipboard.h"
#include "llfloaterinventory.h"
#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
@@ -247,6 +248,10 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
getFilter()->setFilterEmptySystemFolders();
}
+ // hide items that are on the clipboard
+ getFilter()->setFilterClipboard();
+ mClipboardState = LLClipboard::getInstance()->getState();
+
// Initialize base class params.
LLPanel::initFromParams(params);
}
@@ -277,6 +282,14 @@ void LLInventoryPanel::draw()
{
// Select the desired item (in case it wasn't loaded when the selection was requested)
mFolderRoot->updateSelection();
+
+ // Nudge the filter if the clipboard state changed
+ if (mClipboardState != LLClipboard::getInstance()->getState())
+ {
+ mClipboardState = LLClipboard::getInstance()->getState();
+ getFilter()->setModified(LLInventoryFilter::FILTER_RESTART);
+ }
+
LLPanel::draw();
}