diff options
author | Merov Linden <merov@lindenlab.com> | 2012-03-19 18:14:55 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-03-19 18:14:55 -0700 |
commit | b615a553955447cccf8f5b6af60410d4bb3c89a2 (patch) | |
tree | 5f5b7d415816305a354e38c9b33f35cf84791946 /indra/newview/llinventorypanel.cpp | |
parent | 5f90875a9e92c7c92f92a32e64908a776fce64c6 (diff) | |
parent | 86c572ad63f0cf222050e807899e80ea5802e1d7 (diff) |
EXP-1841 : Pull the whole Cut and Paste feature in viewer-experience
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index c47b74815f..71dd963f28 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" @@ -248,6 +249,9 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) getFilter()->setFilterEmptySystemFolders(); } + // keep track of the clipboard state so that we avoid filtering too much + mClipboardState = LLClipboard::instance().getGeneration(); + // Initialize base class params. LLPanel::initFromParams(params); } @@ -278,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::instance().getGeneration()) + { + mClipboardState = LLClipboard::instance().getGeneration(); + getFilter()->setModified(LLClipboard::instance().isCutMode() ? LLInventoryFilter::FILTER_MORE_RESTRICTIVE : LLInventoryFilter::FILTER_LESS_RESTRICTIVE); + } + LLPanel::draw(); } |