From 5033f6b14b9a2156b36cbce52365f6b420c72fd2 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 24 Sep 2014 20:17:44 +0300 Subject: MAINT-4398 FIXED Moving view away from selected prims causes some to deselect themselves since viewer-interesting --- indra/newview/llviewerregion.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 11cbf3fc24..7a6637c0a1 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1485,6 +1485,12 @@ void LLViewerRegion::killObject(LLVOCacheEntry* entry, std::vector& if(drawablep && !drawablep->getParent()) { + if (drawablep->getVObj()->isSelected()) + { + // do not remove selected objects + ((LLViewerOctreeEntryData*)drawablep)->setVisible(); + return; + } LLViewerObject::const_child_list_t& child_list = drawablep->getVObj()->getChildren(); for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin(); iter != child_list.end(); iter++) @@ -1492,9 +1498,9 @@ void LLViewerRegion::killObject(LLVOCacheEntry* entry, std::vector& LLViewerObject* child = *iter; if(child->mDrawable) { - if(!child->mDrawable->getEntry() || !child->mDrawable->getEntry()->hasVOCacheEntry()) + if(!child->mDrawable->getEntry() || !child->mDrawable->getEntry()->hasVOCacheEntry() || child->isSelected()) { - //do not remove parent if any of its children non-cacheable + //do not remove parent if any of its children non-cacheable or selected //especially for the case that an avatar sits on a cache-able object ((LLViewerOctreeEntryData*)drawablep)->setVisible(); return; -- cgit v1.2.3