Change LLViewerMedia::isInterestingEnough() to also check selection
If the object is in the selection, its interesting. Load its media data ASAP. Conceptually reviewed by monroemeow-7.2.2
parent
a386296855
commit
c0eb697a53
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue