summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2014-11-18 17:22:02 +0200
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2014-11-18 17:22:02 +0200
commitf0db860b8a08e076814f4a3586cdef7ead8acb9c (patch)
tree86e255be0d92101c4baa9385861c222c054bbaf0
parentc686407731751ababecf01569fa02eb5ba62337d (diff)
MAINT-1789 FIXED Object inspector doesn't show any information about object if user uses Select Only My Objects option
-rwxr-xr-xindra/newview/llinspectobject.cpp2
-rwxr-xr-xindra/newview/llselectmgr.cpp21
-rwxr-xr-xindra/newview/llselectmgr.h4
3 files changed, 15 insertions, 12 deletions
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp
index a7b93b8030..46019557f8 100755
--- a/indra/newview/llinspectobject.cpp
+++ b/indra/newview/llinspectobject.cpp
@@ -219,7 +219,7 @@ void LLInspectObject::onOpen(const LLSD& data)
LLViewerMediaFocus::getInstance()->clearFocus();
LLSelectMgr::instance().deselectAll();
- mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj);
+ mObjectSelection = LLSelectMgr::instance().selectObjectAndFamily(obj,FALSE,TRUE);
// Mark this as a transient selection
struct SetTransient : public LLSelectedNodeFunctor
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 2a0a2f31be..9d088d02f8 100755
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -368,7 +368,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectOnly(LLViewerObject* object, S3
//-----------------------------------------------------------------------------
// Select the object, parents and children.
//-----------------------------------------------------------------------------
-LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, BOOL add_to_end)
+LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj, BOOL add_to_end, BOOL ignore_select_owned)
{
llassert( obj );
@@ -385,7 +385,7 @@ LLObjectSelectionHandle LLSelectMgr::selectObjectAndFamily(LLViewerObject* obj,
return NULL;
}
- if (!canSelectObject(obj))
+ if (!canSelectObject(obj,ignore_select_owned))
{
//make_ui_sound("UISndInvalidOp");
return NULL;
@@ -6771,29 +6771,32 @@ void LLSelectMgr::validateSelection()
getSelection()->applyToObjects(&func);
}
-BOOL LLSelectMgr::canSelectObject(LLViewerObject* object)
+BOOL LLSelectMgr::canSelectObject(LLViewerObject* object, BOOL ignore_select_owned)
{
// Never select dead objects
if (!object || object->isDead())
{
return FALSE;
}
-
+
if (mForceSelection)
{
return TRUE;
}
- if ((gSavedSettings.getBOOL("SelectOwnedOnly") && !object->permYouOwner()) ||
- (gSavedSettings.getBOOL("SelectMovableOnly") && (!object->permMove() || object->isPermanentEnforced())))
+ if(!ignore_select_owned)
{
- // only select my own objects
- return FALSE;
+ if ((gSavedSettings.getBOOL("SelectOwnedOnly") && !object->permYouOwner()) ||
+ (gSavedSettings.getBOOL("SelectMovableOnly") && (!object->permMove() || object->isPermanentEnforced())))
+ {
+ // only select my own objects
+ return FALSE;
+ }
}
// Can't select orphans
if (object->isOrphaned()) return FALSE;
-
+
// Can't select avatars
if (object->isAvatar()) return FALSE;
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 9906dfd524..23c41e4cc1 100755
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -454,7 +454,7 @@ public:
//
// *NOTE: You must hold on to the object selection handle, otherwise
// the objects will be automatically deselected in 1 frame.
- LLObjectSelectionHandle selectObjectAndFamily(LLViewerObject* object, BOOL add_to_end = FALSE);
+ LLObjectSelectionHandle selectObjectAndFamily(LLViewerObject* object, BOOL add_to_end = FALSE, BOOL ignore_select_owned = FALSE);
// For when you want just a child object.
LLObjectSelectionHandle selectObjectOnly(LLViewerObject* object, S32 face = SELECT_ALL_TES);
@@ -609,7 +609,7 @@ public:
void validateSelection();
// returns TRUE if it is possible to select this object
- BOOL canSelectObject(LLViewerObject* object);
+ BOOL canSelectObject(LLViewerObject* object, BOOL ignore_select_owned = FALSE);
// Returns TRUE if the viewer has information on all selected objects
BOOL selectGetAllRootsValid();