From b052240a500707fc0e34ef6f23a02af39fdfc500 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 22 May 2024 12:33:36 +0300 Subject: viewer#1400 Allow forcing specific LODs for selection --- indra/newview/llselectmgr.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'indra/newview/llselectmgr.cpp') 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() -- cgit v1.2.3