summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorygallery.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventorygallery.cpp')
-rw-r--r--indra/newview/llinventorygallery.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 0801b71e34..8170c0c63b 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -2347,6 +2347,7 @@ void LLInventoryGalleryItem::draw()
LLUIColor border_color = LLUIColorTable::instance().getColor(mSelected ? "MenuItemHighlightBgColor" : "TextFgTentativeColor", LLColor4::white);
LLRect border = getChildView("preview_thumbnail")->getRect();
border.mRight = border.mRight + 1;
+ border.mTop = border.mTop + 1;
gl_rect_2d(border, border_color.get(), FALSE);
}
@@ -2449,7 +2450,19 @@ BOOL LLInventoryGalleryItem::handleDoubleClick(S32 x, S32 y, MASK mask)
{
if (mIsFolder && mGallery)
{
- mGallery->setRootFolder(mUUID);
+ // setRootFolder can destroy this item.
+ // Delay it until handleDoubleClick processing is complete
+ // or make gallery handle doubleclicks.
+ LLHandle<LLPanel> handle = mGallery->getHandle();
+ LLUUID navigate_to = mUUID;
+ doOnIdleOneTime([handle, navigate_to]()
+ {
+ LLInventoryGallery* gallery = (LLInventoryGallery*)handle.get();
+ if (gallery)
+ {
+ gallery->setRootFolder(navigate_to);
+ }
+ });
}
else
{