diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-04 15:31:19 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-04 15:31:19 -0800 |
commit | c9868071b113b251e03d95163118b696e28bbe98 (patch) | |
tree | 8428d2e97f7a61b1a10e7e10494199a39969369d /indra/newview/llfolderview.cpp | |
parent | e833e7ad442f5b59f95c6ccfcaaf1d103d247d69 (diff) | |
parent | e8659e0e13c65308ad2f036dc7e7ccff0e665976 (diff) |
Merge from trunk. Conflicts manually resolved in:
U indra/llui/lluictrlfactory.cpp
U indra/newview/llinventorybridge.cpp
U indra/newview/llviewertexture.cpp
U indra/newview/llviewertexture.h
Diffstat (limited to 'indra/newview/llfolderview.cpp')
-rw-r--r-- | indra/newview/llfolderview.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 98fae1c2a0..112b23d2df 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -206,7 +206,8 @@ LLFolderView::LLFolderView(const Params& p) mAutoOpenCandidate = NULL; mAutoOpenTimer.stop(); mKeyboardSelection = FALSE; - mIndentation = -LEFT_INDENTATION; // children start at indentation 0 + static LLUICachedControl<S32> indentation("FolderIndentation", 0); + mIndentation = -indentation; // children start at indentation 0 gIdleCallbacks.addFunction(idle, this); //clear label @@ -330,8 +331,8 @@ BOOL LLFolderView::addFolder( LLFolderViewFolder* folder) else { mFolders.insert(mFolders.begin(), folder); - folder->setShowLoadStatus(true); } + folder->setShowLoadStatus(true); folder->setOrigin(0, 0); folder->reshape(getRect().getWidth(), 0); folder->setVisible(FALSE); @@ -751,7 +752,7 @@ void LLFolderView::sanitizeSelection() } // Don't allow invisible items (such as root folders) to be selected. - if (item->getDontShowInHierarchy()) + if (item->getHidden()) { items_to_remove.push_back(item); } @@ -774,7 +775,7 @@ void LLFolderView::sanitizeSelection() parent_folder; parent_folder = parent_folder->getParentFolder()) { - if (parent_folder->potentiallyVisible()) + if (parent_folder->potentiallyVisible() && !parent_folder->getHidden()) { // give initial selection to first ancestor folder that potentially passes the filter if (!new_selection) @@ -795,6 +796,11 @@ void LLFolderView::sanitizeSelection() { // nothing selected to start with, so pick "My Inventory" as best guess new_selection = getItemByID(gInventory.getRootFolderID()); + // ... except if it's hidden from the UI. + if (new_selection && new_selection->getHidden()) + { + new_selection = NULL; + } } if (new_selection) @@ -1817,6 +1823,13 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, BOOL handled = LLView::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + // When there are no visible children drag and drop is handled + // by the folder which is the hierarchy root. + if (!handled && !hasVisibleChildren()) + { + handled = mFolders.front()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg); + } + if (handled) { lldebugst(LLERR_USER_INPUT) << "dragAndDrop handled by LLFolderView" << llendl; |