summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelobjectinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelobjectinventory.cpp')
-rw-r--r--indra/newview/llpanelobjectinventory.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index bd40c9dd2b..d935c01eb8 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -960,9 +960,15 @@ void LLTaskLSLBridge::openItem()
LLSD floater_key;
floater_key["taskid"] = mPanel->getTaskUUID();
floater_key["itemid"] = mUUID;
+
LLLiveLSLEditor* preview = LLFloaterReg::showTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key, TAKE_FOCUS_YES);
if (preview)
{
+ LLSelectNode *node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, TRUE);
+ if (node && node->mValid)
+ {
+ preview->setObjectName(node->mName);
+ }
preview->setObjectID(mPanel->getTaskUUID());
}
}
@@ -1368,7 +1374,8 @@ void LLPanelObjectInventory::reset()
LLEditMenuHandler::gEditMenuHandler = mFolders;
}
- LLRect scroller_rect(0, getRect().getHeight(), getRect().getWidth(), 0);
+ int offset = hasBorder() ? getBorder()->getBorderWidth() << 1 : 0;
+ LLRect scroller_rect(0, getRect().getHeight() - offset, getRect().getWidth() - offset, 0);
LLScrollContainer::Params scroll_p;
scroll_p.name("task inventory scroller");
scroll_p.rect(scroller_rect);