summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfolderview.cpp')
-rw-r--r--indra/newview/llfolderview.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index bdb7262416..ec162e00eb 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -527,6 +527,7 @@ void LLFolderView::reshape(S32 width, S32 height, BOOL called_from_parent)
scroll_rect = mScrollContainer->getContentWindowRect();
}
width = llmax(mMinWidth, scroll_rect.getWidth());
+ height = llmax(height, scroll_rect.getHeight());
// restrict width with scroll container's width
if (mUseEllipses)
@@ -1905,20 +1906,25 @@ BOOL LLFolderView::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
std::string& tooltip_msg)
{
mDragAndDropThisFrame = TRUE;
+ // have children handle it first
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
+ // when drop is not handled by child, it should be handled
// by the folder which is the hierarchy root.
- if (!handled && !hasVisibleChildren())
+ if (!handled)
{
- if (mFolders.empty())
+ if (getListener()->getUUID().notNull())
{
- handled = handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
+ LLFolderViewFolder::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
}
else
{
- handled = mFolders.front()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
+ if (!mFolders.empty())
+ {
+ // dispatch to last folder as a hack to support "Contents" folder in object inventory
+ handled = mFolders.back()->handleDragAndDropFromChild(mask,drop,cargo_type,cargo_data,accept,tooltip_msg);
+ }
}
}