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.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 382569fa3a..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"
@@ -206,10 +207,11 @@ void LLInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
scroller_view_rect.translate(-scroller_view_rect.mLeft, -scroller_view_rect.mBottom);
LLScrollContainer::Params scroller_params(params.scroll());
scroller_params.rect(scroller_view_rect);
- mScroller = LLUICtrlFactory::create<LLScrollContainer>(scroller_params);
+ mScroller = LLUICtrlFactory::create<LLFolderViewScrollContainer>(scroller_params);
addChild(mScroller);
mScroller->addChild(mFolderRoot);
mFolderRoot->setScrollContainer(mScroller);
+ mFolderRoot->setFollowsAll();
mFolderRoot->addChild(mFolderRoot->mStatusTextBox);
}
@@ -247,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);
}
@@ -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::instance().getGeneration())
+ {
+ mClipboardState = LLClipboard::instance().getGeneration();
+ getFilter()->setModified(LLClipboard::instance().isCutMode() ? LLInventoryFilter::FILTER_MORE_RESTRICTIVE : LLInventoryFilter::FILTER_LESS_RESTRICTIVE);
+ }
+
LLPanel::draw();
}
@@ -817,7 +830,7 @@ BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask)
if(handled)
{
ECursorType cursor = getWindow()->getCursor();
- if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() && cursor == UI_CURSOR_ARROW)
+ if (LLInventoryModelBackgroundFetch::instance().folderFetchActive() && cursor == UI_CURSOR_ARROW)
{
// replace arrow cursor with arrow and hourglass cursor
getWindow()->setCursor(UI_CURSOR_WORKING);