summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2014-09-24 20:17:44 +0300
committerandreykproductengine <akleshchev@productengine.com>2014-09-24 20:17:44 +0300
commit5033f6b14b9a2156b36cbce52365f6b420c72fd2 (patch)
tree436ce04adb1dd714fd25c6541d86660beff8cbb3 /indra/newview/llviewerregion.cpp
parentdd8d2b59f74ff01bd0b79b841e3974b3b00ddeb1 (diff)
MAINT-4398 FIXED Moving view away from selected prims causes some to deselect themselves since viewer-interesting
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-xindra/newview/llviewerregion.cpp10
1 files 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<LLDrawable*>&
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<LLDrawable*>&
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;