Minor bits and bobs from upstream.

This commit is contained in:
Shyotl
2019-10-18 23:59:41 -05:00
parent 1c1e64f48f
commit 15c3ff0544
5 changed files with 43 additions and 39 deletions

View File

@@ -4548,35 +4548,34 @@ void LLAppViewer::disconnectViewer()
if (gFloaterView)
{
gFloaterView->restoreAll();
}
std::list<LLFloater*> floaters_to_close;
for(LLView::child_list_const_iter_t it = gFloaterView->getChildList()->begin();
it != gFloaterView->getChildList()->end();
++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"
))
std::list<LLFloater*> floaters_to_close;
for (LLView::child_list_const_iter_t it = gFloaterView->getChildList()->begin();
it != gFloaterView->getChildList()->end();
++it)
{
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();
}
}

View File

@@ -325,10 +325,13 @@ LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj)
{
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
cav->matchVolumeTransform();
// Sync up position/rotation with object
cav->matchVolumeTransform();
}
return cav;
}

View File

@@ -1530,6 +1530,7 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
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["mesh"] = mesh_index[data.mBaseModel];
instance_entry["mesh_name"] = instance.mLabel;
instance_entry["face_list"] = LLSD::emptyArray();

View File

@@ -1355,16 +1355,11 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp)
if (objectp)
{
if (objectp->isDead())
{
// This object is already dead. Don't need to do more.
return TRUE;
}
else
{
objectp->markDead();
}
// 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
// so create a pointer to make sure object will stay alive untill markDead() finishes
LLPointer<LLViewerObject> sp(objectp);
sp->markDead(); // does the right thing if object already dead
return TRUE;
}
return FALSE;

View File

@@ -442,6 +442,12 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
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();
if (texture->getUrl().empty())
{