Example #1
0
// static
LLPreview* LLPreview::show( const LLUUID& item_uuid, BOOL take_focus )
{
	LLPreview* instance = LLPreview::find(item_uuid);
	if(instance)
	{
		if (LLFloater::getFloaterHost() && LLFloater::getFloaterHost() != instance->getHost())
		{
			// this preview window is being opened in a new context
			// needs to be rehosted
			LLFloater::getFloaterHost()->addFloater(instance, TRUE);
		}
		instance->open();  /*Flawfinder: ignore*/
		if (take_focus)
		{
			instance->setFocus(TRUE);
		}
	}

	return instance;
}