diff options
author | skolb <none@none> | 2009-12-15 09:25:08 -0800 |
---|---|---|
committer | skolb <none@none> | 2009-12-15 09:25:08 -0800 |
commit | 7c18f1c3037100988642c7c05796d6ca16502972 (patch) | |
tree | debd608bb66cf935ae109ffe0550d2f91818dd29 /indra/newview | |
parent | 870d4449f5eec1c2a7e5e4627a0433846ab256aa (diff) | |
parent | 60e6fa139e8056288514cfa7276eee9133953de9 (diff) |
Merge
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewermedia.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llviewermedia.h | 2 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 2 |
3 files changed, 15 insertions, 4 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 367c0c8343..103a70e032 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -561,11 +561,22 @@ bool LLViewerMedia::getInWorldMediaDisabled() ////////////////////////////////////////////////////////////////////////////////////////// // static -bool LLViewerMedia::isInterestingEnough(const LLUUID &object_id, const F64 &object_interest) +bool LLViewerMedia::isInterestingEnough(const LLVOVolume *object, const F64 &object_interest) { bool result = false; - if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == object_id) + if (NULL == object) + { + result = false; + } + // Focused? Then it is interesting! + else if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == object->getID()) + { + result = true; + } + // Selected? Then it is interesting! + // XXX Sadly, 'contains()' doesn't take a const :( + else if (LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(object))) { result = true; } diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 26b822aba6..7151186089 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -112,7 +112,7 @@ class LLViewerMedia static void setInWorldMediaDisabled(bool disabled); static bool getInWorldMediaDisabled(); - static bool isInterestingEnough(const LLUUID& object_id, const F64 &object_interest); + static bool isInterestingEnough(const LLVOVolume* object, const F64 &object_interest); // Returns the priority-sorted list of all media impls. static impl_list &getPriorityList(); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 801bd90423..d24edacd13 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -139,7 +139,7 @@ public: } virtual bool isInterestingEnough() const { - return LLViewerMedia::isInterestingEnough(mObject->getID(), getMediaInterest()); + return LLViewerMedia::isInterestingEnough(mObject, getMediaInterest()); } virtual std::string getCapabilityUrl(const std::string &name) const |