From 9719841f63d9e9846bbe954d2bf182428129eb20 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 25 Feb 2019 11:36:28 +0200 Subject: SL-10326 Restore ability to select own avatar and move it via manipulation arrows --- indra/newview/llselectmgr.cpp | 8 ++++++++ indra/newview/llselectmgr.h | 2 ++ indra/newview/llviewerwindow.cpp | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 4a2d545b33..02093fa6bd 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3857,6 +3857,14 @@ BOOL LLSelectMgr::selectGetAggregateTexturePermissions(LLAggregatePermissions& r return TRUE; } +BOOL LLSelectMgr::isSelfAvatarSelected() +{ + if (mAllowSelectAvatar) + { + return (getSelection()->getObjectCount() == 1) && (getSelection()->getFirstRootObject() == gAgentAvatarp); + } + return FALSE; +} //-------------------------------------------------------------------- // Duplicate objects diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index caf104178f..9f2ac857a5 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -709,6 +709,8 @@ public: LLPermissions* findObjectPermissions(const LLViewerObject* object); + BOOL isSelfAvatarSelected(); + void selectDelete(); // Delete on simulator void selectForceDelete(); // just delete, no into trash void selectDuplicate(const LLVector3& offset, BOOL select_copy); // Duplicate on simulator diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e53ccd7b8d..3b12816c99 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3845,7 +3845,7 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, BOOL draw_handles = TRUE; - if (tool == LLToolCompTranslate::getInstance() && !all_selected_objects_move) + if (tool == LLToolCompTranslate::getInstance() && !all_selected_objects_move && !LLSelectMgr::getInstance()->isSelfAvatarSelected()) { draw_handles = FALSE; } -- cgit v1.2.3