diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-29 18:30:05 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-06-29 18:30:05 +0300 |
commit | 1b369c7f10c987dcd1c985ccff7b94ff27fbfe12 (patch) | |
tree | 9c94f15adb7695c647076f9c869b14f4c9b45c50 /indra/newview/llinspectobject.cpp | |
parent | 2c940a1d8015601f5eea628b8940fde0547756d6 (diff) | |
parent | 1e4f2ec07e32a142f35817d3186a124df3f8cd25 (diff) |
Merge branch 'master' (DRTVWR-543) into DRTVWR-483
# Conflicts:
# indra/newview/llviewertexturelist.cpp
Diffstat (limited to 'indra/newview/llinspectobject.cpp')
-rw-r--r-- | indra/newview/llinspectobject.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 628e01a5c6..5329f10612 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -28,16 +28,17 @@ #include "llinspectobject.h" // Viewer +#include "llagent.h" // To standup #include "llfloatersidepanelcontainer.h" #include "llinspect.h" #include "llmediaentry.h" -#include "llnotificationsutil.h" // *TODO: Eliminate, add LLNotificationsUtil wrapper #include "llselectmgr.h" #include "llslurl.h" #include "llviewermenu.h" // handle_object_touch(), handle_buy() #include "llviewermedia.h" #include "llviewermediafocus.h" #include "llviewerobjectlist.h" // to select the requested object +#include "llvoavatarself.h" // Linden libraries #include "llbutton.h" // setLabel(), not virtual! @@ -625,7 +626,31 @@ void LLInspectObject::onClickTouch() void LLInspectObject::onClickSit() { - handle_object_sit_or_stand(); + bool is_sitting = false; + if (mObjectSelection) + { + LLSelectNode* node = mObjectSelection->getFirstRootNode(); + if (node && node->mValid) + { + LLViewerObject* root_object = node->getObject(); + if (root_object + && isAgentAvatarValid() + && gAgentAvatarp->isSitting() + && gAgentAvatarp->getRoot() == root_object) + { + is_sitting = true; + } + } + } + + if (is_sitting) + { + gAgent.standUp(); + } + else + { + handle_object_sit(mObjectID); + } closeFloater(); } |