summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-05-22 12:33:36 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-05-23 11:46:50 +0300
commitb052240a500707fc0e34ef6f23a02af39fdfc500 (patch)
tree76e77a6efb566e5f9da845d80bf6f4ce72f90d00 /indra/newview/llselectmgr.cpp
parentc255174c561fcafcd114a787a9156e05347563d1 (diff)
viewer#1400 Allow forcing specific LODs for selection
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 885f4d993e..cbc52aeec6 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -250,6 +250,23 @@ LLSelectMgr::LLSelectMgr()
mForceSelection = FALSE;
mShowSelection = FALSE;
+
+ LLControlVariable* ctrl = gSavedSettings.getControl("DebugSelectionLODs").get();
+ if (ctrl)
+ {
+ mSlectionLodModChangedConnection = ctrl->getSignal()->connect([this](LLControlVariable*, const LLSD&, const LLSD&)
+ {
+ for (LLObjectSelection::iterator iter = mSelectedObjects->begin();
+ iter != mSelectedObjects->end(); ++iter)
+ {
+ LLViewerObject* object = (*iter)->getObject();
+ if (object)
+ {
+ object->updateLOD();
+ }
+ }
+ });
+ }
}
@@ -259,6 +276,7 @@ LLSelectMgr::LLSelectMgr()
LLSelectMgr::~LLSelectMgr()
{
clearSelections();
+ mSlectionLodModChangedConnection.disconnect();
}
void LLSelectMgr::clearSelections()