From 91f77318db63d4b2560390551306056c4a6cc2d5 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 8 Feb 2012 15:44:02 -0800 Subject: EXP-1873 : Implement the hiding of cut items on the clipboard --- indra/newview/llinventorypanel.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/llinventorypanel.cpp') 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(); } -- cgit v1.2.3 From d245dad7ddbac36b013c70326ad25eb9247784f6 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 10 Feb 2012 18:05:07 -0800 Subject: EXP-1863 : Fix the filtering of cut folders, also fix the move to trash of folders in double cut scenarios --- indra/newview/llinventorypanel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 27f97ad26f..4508e7e083 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -248,8 +248,7 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) getFilter()->setFilterEmptySystemFolders(); } - // hide items that are on the clipboard - getFilter()->setFilterClipboard(); + // keep track of the clipboard state so that we avoid filtering too much mClipboardState = LLClipboard::getInstance()->getState(); // Initialize base class params. -- cgit v1.2.3 From c2922a402d2e45284e2cd829175b958e081b264d Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 22 Feb 2012 16:55:46 -0800 Subject: EXP-1905, EXP-1911: Be a bit less forcefull when updating the filter after a change on the clipboard --- indra/newview/llinventorypanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 4508e7e083..d569d819dd 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -286,7 +286,7 @@ void LLInventoryPanel::draw() if (mClipboardState != LLClipboard::getInstance()->getState()) { mClipboardState = LLClipboard::getInstance()->getState(); - getFilter()->setModified(LLInventoryFilter::FILTER_RESTART); + getFilter()->setModified(LLClipboard::getInstance()->isCutMode() ? LLInventoryFilter::FILTER_MORE_RESTRICTIVE : LLInventoryFilter::FILTER_LESS_RESTRICTIVE); } LLPanel::draw(); -- cgit v1.2.3 From f0a1b43f2270cb8424409babf5ae88233cdd8f6c Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 1 Mar 2012 21:35:05 -0800 Subject: EXP-1841 : Use instance instead of getInstance on LLClipboard singleton. --- indra/newview/llinventorypanel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index a1e17ffbf2..b7e2e8c67c 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -249,7 +249,7 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) } // keep track of the clipboard state so that we avoid filtering too much - mClipboardState = LLClipboard::getInstance()->getState(); + mClipboardState = LLClipboard::instance().getState(); // Initialize base class params. LLPanel::initFromParams(params); @@ -283,10 +283,10 @@ void LLInventoryPanel::draw() mFolderRoot->updateSelection(); // Nudge the filter if the clipboard state changed - if (mClipboardState != LLClipboard::getInstance()->getState()) + if (mClipboardState != LLClipboard::instance().getState()) { - mClipboardState = LLClipboard::getInstance()->getState(); - getFilter()->setModified(LLClipboard::getInstance()->isCutMode() ? LLInventoryFilter::FILTER_MORE_RESTRICTIVE : LLInventoryFilter::FILTER_LESS_RESTRICTIVE); + mClipboardState = LLClipboard::instance().getState(); + getFilter()->setModified(LLClipboard::instance().isCutMode() ? LLInventoryFilter::FILTER_MORE_RESTRICTIVE : LLInventoryFilter::FILTER_LESS_RESTRICTIVE); } LLPanel::draw(); -- cgit v1.2.3 From a41507eef0a79731d1894ccf3179da6165f310ab Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 1 Mar 2012 23:10:06 -0800 Subject: EXP-1841 : change mState to mGeneration in LLClipboard. --- indra/newview/llinventorypanel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index b7e2e8c67c..b417689858 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -249,7 +249,7 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params) } // keep track of the clipboard state so that we avoid filtering too much - mClipboardState = LLClipboard::instance().getState(); + mClipboardState = LLClipboard::instance().getGeneration(); // Initialize base class params. LLPanel::initFromParams(params); @@ -283,9 +283,9 @@ void LLInventoryPanel::draw() mFolderRoot->updateSelection(); // Nudge the filter if the clipboard state changed - if (mClipboardState != LLClipboard::instance().getState()) + if (mClipboardState != LLClipboard::instance().getGeneration()) { - mClipboardState = LLClipboard::instance().getState(); + mClipboardState = LLClipboard::instance().getGeneration(); getFilter()->setModified(LLClipboard::instance().isCutMode() ? LLInventoryFilter::FILTER_MORE_RESTRICTIVE : LLInventoryFilter::FILTER_LESS_RESTRICTIVE); } -- cgit v1.2.3