Пример #1
0
// bit of a hack to make sure the inventory is open.
void LLInventoryPanel::openStartFolderOrMyInventory()
{
	// Find My Inventory folder and open it up by name
	for (LLView *child = mFolderRoot.get()->getFirstChild(); child; child = mFolderRoot.get()->findNextSibling(child))
	{
		LLFolderViewFolder *fchild = dynamic_cast<LLFolderViewFolder*>(child);
		if (fchild
			&& fchild->getListener()
				&& fchild->getListener()->getUUID() == gInventory.getRootFolderID())
		{
			fchild->setOpen(TRUE);
			break;
		}
	}
}
// bit of a hack to make sure the inventory is open.
void LLInventoryPanel::openStartFolderOrMyInventory()
{
	if (mStartFolderString != "")
	{
		mFolderRoot->openFolder(mStartFolderString);
	}
	else
	{
		// Find My Inventory folder and open it up by name
		for (LLView *child = mFolderRoot->getFirstChild(); child; child = mFolderRoot->findNextSibling(child))
		{
			LLFolderViewFolder *fchild = dynamic_cast<LLFolderViewFolder*>(child);
			if (fchild && fchild->getListener() &&
				(fchild->getListener()->getUUID() == gInventory.getRootFolderID()))
			{
				const std::string& child_name = child->getName();
				mFolderRoot->openFolder(child_name);
				break;
			}
		}
	}
}