From e8448d47138929bf30ae20f89f9d33fc07fb9dbb Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 17 Aug 2011 16:05:31 -0700 Subject: EXP-1099 FIX Cannot drag item on to empty space in outbox folder --- indra/newview/llfolderview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfolderview.cpp') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 6461a5525e..0751378428 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1914,7 +1914,7 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // by the folder which is the hierarchy root. if (!handled && getListener()->getUUID().notNull()) { - LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + handled = LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); } if (handled) -- cgit v1.2.3 From fea0917fbd9bde846001c00464a66e480ca1baa3 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 23 Aug 2011 12:20:10 -0700 Subject: EXP-1099 FIX Cannot drag item on to empty space in outbox folder corrected bad logic for resizing LLFolderView --- indra/newview/llfolderview.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfolderview.cpp') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 6461a5525e..9cfb25f207 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -181,6 +181,7 @@ LLFolderView::Params::Params() // Default constructor LLFolderView::LLFolderView(const Params& p) : LLFolderViewFolder(p), + mRunningHeight(0), mScrollContainer( NULL ), mPopupMenuHandle(), mAllowMultiSelect(p.allow_multiselect), @@ -479,6 +480,7 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen target_height = running_height; } + mRunningHeight = running_height; LLRect scroll_rect = mScrollContainer->getContentWindowRect(); reshape( llmax(scroll_rect.getWidth(), total_width), running_height ); @@ -524,10 +526,11 @@ void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent) LLRect scroll_rect; if (mScrollContainer) { + LLView::reshape(width, height, called_from_parent); scroll_rect = mScrollContainer->getContentWindowRect(); } width = llmax(mMinWidth, scroll_rect.getWidth()); - height = llmax(height, scroll_rect.getHeight()); + height = llmax(mRunningHeight, scroll_rect.getHeight()); // restrict width with scroll container's width if (mUseEllipses) -- cgit v1.2.3 From dc919956194376bcb6e21eca7f0375c400a2ad5f Mon Sep 17 00:00:00 2001 From: "leslie@leslie-HPz600.lindenlab.com" Date: Tue, 30 Aug 2011 12:24:51 -0700 Subject: EXP-1158 FIX -- Viewer crash when deleting items from Outbox when some folders are open * New selection change on delete also insures the selection does not propagate to the child of a selected item. --- indra/newview/llfolderview.cpp | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfolderview.cpp') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 8181e5a823..cfd7d96eb0 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1010,6 +1010,33 @@ void LLFolderView::removeSelectedItems( void ) LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLFolderView::onItemsRemovalConfirmation, this, _1, _2)); } +bool isDescendantOfASelectedItem(LLFolderViewItem* item, const std::vector& selectedItems) +{ + LLFolderViewItem* item_parent = dynamic_cast(item->getParent()); + + if (item_parent) + { + for(std::vector::const_iterator it = selectedItems.begin(); it != selectedItems.end(); ++it) + { + const LLFolderViewItem* const selected_item = (*it); + + LLFolderViewItem* parent = item_parent; + + while (parent) + { + if (selected_item == parent) + { + return true; + } + + parent = dynamic_cast(parent->getParent()); + } + } + } + + return false; +} + void LLFolderView::onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -1084,7 +1111,7 @@ void LLFolderView::onItemsRemovalConfirmation(const LLSD& notification, const LL if (!new_selection) { new_selection = last_item->getPreviousOpenNode(FALSE); - while (new_selection && new_selection->isSelected()) + while (new_selection && (new_selection->isSelected() || isDescendantOfASelectedItem(new_selection, items))) { new_selection = new_selection->getPreviousOpenNode(FALSE); } -- cgit v1.2.3 From 03e965a7324ca9ecc3d99faf27e2ea4d7b2fbc52 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 15 Sep 2011 16:16:33 -0700 Subject: EXP-974 FIX Inventory Keystroke Behavior No Longer Working --- indra/newview/llfolderview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfolderview.cpp') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 8b72d83830..9ba5f827e2 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1723,7 +1723,7 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char) } BOOL handled = FALSE; - if (gFocusMgr.childHasKeyboardFocus(getRoot())) + if (mParentPanel->hasFocus()) { // SL-51858: Key presses are not being passed to the Popup menu. // A proper fix is non-trivial so instead just close the menu. -- cgit v1.2.3