Minor bits and bobs from upstream.
This commit is contained in:
@@ -4548,35 +4548,34 @@ void LLAppViewer::disconnectViewer()
|
|||||||
if (gFloaterView)
|
if (gFloaterView)
|
||||||
{
|
{
|
||||||
gFloaterView->restoreAll();
|
gFloaterView->restoreAll();
|
||||||
}
|
|
||||||
|
|
||||||
|
std::list<LLFloater*> floaters_to_close;
|
||||||
std::list<LLFloater*> floaters_to_close;
|
for (LLView::child_list_const_iter_t it = gFloaterView->getChildList()->begin();
|
||||||
for(LLView::child_list_const_iter_t it = gFloaterView->getChildList()->begin();
|
it != gFloaterView->getChildList()->end();
|
||||||
it != gFloaterView->getChildList()->end();
|
++it)
|
||||||
++it)
|
|
||||||
{
|
|
||||||
// The following names are defined in the
|
|
||||||
// floater_image_preview.xml
|
|
||||||
// floater_sound_preview.xml
|
|
||||||
// floater_animation_preview.xml
|
|
||||||
// files.
|
|
||||||
LLFloater* fl = static_cast<LLFloater*>(*it);
|
|
||||||
if(fl
|
|
||||||
&& (fl->getName() == "Image Preview"
|
|
||||||
|| fl->getName() == "Sound Preview"
|
|
||||||
|| fl->getName() == "Animation Preview"
|
|
||||||
))
|
|
||||||
{
|
{
|
||||||
floaters_to_close.push_back(fl);
|
// The following names are defined in the
|
||||||
|
// floater_image_preview.xml
|
||||||
|
// floater_sound_preview.xml
|
||||||
|
// floater_animation_preview.xml
|
||||||
|
// files.
|
||||||
|
LLFloater* fl = static_cast<LLFloater*>(*it);
|
||||||
|
if (fl
|
||||||
|
&& (fl->getName() == "Image Preview"
|
||||||
|
|| fl->getName() == "Sound Preview"
|
||||||
|
|| fl->getName() == "Animation Preview"
|
||||||
|
))
|
||||||
|
{
|
||||||
|
floaters_to_close.push_back(fl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
while (!floaters_to_close.empty())
|
||||||
|
{
|
||||||
|
LLFloater* fl = floaters_to_close.front();
|
||||||
|
floaters_to_close.pop_front();
|
||||||
|
fl->close();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
while(!floaters_to_close.empty())
|
|
||||||
{
|
|
||||||
LLFloater* fl = floaters_to_close.front();
|
|
||||||
floaters_to_close.pop_front();
|
|
||||||
fl->close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -325,10 +325,13 @@ LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj)
|
|||||||
{
|
{
|
||||||
LLControlAvatar *cav = (LLControlAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion(), CO_FLAG_CONTROL_AVATAR);
|
LLControlAvatar *cav = (LLControlAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion(), CO_FLAG_CONTROL_AVATAR);
|
||||||
|
|
||||||
cav->mRootVolp = obj;
|
if (cav)
|
||||||
|
{
|
||||||
|
cav->mRootVolp = obj;
|
||||||
|
|
||||||
// Sync up position/rotation with object
|
// Sync up position/rotation with object
|
||||||
cav->matchVolumeTransform();
|
cav->matchVolumeTransform();
|
||||||
|
}
|
||||||
|
|
||||||
return cav;
|
return cav;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1530,6 +1530,7 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
|
|||||||
instance_entry["material"] = LL_MCODE_WOOD;
|
instance_entry["material"] = LL_MCODE_WOOD;
|
||||||
instance_entry["physics_shape_type"] = data.mModel[LLModel::LOD_PHYSICS].notNull() ? (U8)(LLViewerObject::PHYSICS_SHAPE_PRIM) : (U8)(LLViewerObject::PHYSICS_SHAPE_CONVEX_HULL);
|
instance_entry["physics_shape_type"] = data.mModel[LLModel::LOD_PHYSICS].notNull() ? (U8)(LLViewerObject::PHYSICS_SHAPE_PRIM) : (U8)(LLViewerObject::PHYSICS_SHAPE_CONVEX_HULL);
|
||||||
instance_entry["mesh"] = mesh_index[data.mBaseModel];
|
instance_entry["mesh"] = mesh_index[data.mBaseModel];
|
||||||
|
instance_entry["mesh_name"] = instance.mLabel;
|
||||||
|
|
||||||
instance_entry["face_list"] = LLSD::emptyArray();
|
instance_entry["face_list"] = LLSD::emptyArray();
|
||||||
|
|
||||||
|
|||||||
@@ -1355,16 +1355,11 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp)
|
|||||||
|
|
||||||
if (objectp)
|
if (objectp)
|
||||||
{
|
{
|
||||||
if (objectp->isDead())
|
// We are going to cleanup a lot of smart pointers to this object, they might be last,
|
||||||
{
|
// and object being NULLed while inside it's own function won't be pretty
|
||||||
// This object is already dead. Don't need to do more.
|
// so create a pointer to make sure object will stay alive untill markDead() finishes
|
||||||
return TRUE;
|
LLPointer<LLViewerObject> sp(objectp);
|
||||||
}
|
sp->markDead(); // does the right thing if object already dead
|
||||||
else
|
|
||||||
{
|
|
||||||
objectp->markDead();
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
@@ -442,6 +442,12 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
|
|||||||
|
|
||||||
if (!imagep.isNull())
|
if (!imagep.isNull())
|
||||||
{
|
{
|
||||||
|
if (boost_priority != LLViewerTexture::BOOST_ALM && imagep->getBoostLevel() == LLViewerTexture::BOOST_ALM)
|
||||||
|
{
|
||||||
|
// Workaround: we need BOOST_ALM texture for something, 'rise' to NONE
|
||||||
|
imagep->setBoostLevel(LLViewerTexture::BOOST_NONE);
|
||||||
|
}
|
||||||
|
|
||||||
LLViewerFetchedTexture *texture = imagep.get();
|
LLViewerFetchedTexture *texture = imagep.get();
|
||||||
if (texture->getUrl().empty())
|
if (texture->getUrl().empty())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user