FIX EXT-4468 DEV-41991: Make selected objects "more important" when loading their media data

master
Rick Pasetto 2010-01-19 12:24:58 -08:00
parent 72684c15f7
commit 6d952dd40d
3 changed files with 19 additions and 4 deletions

View File

@ -192,6 +192,9 @@ void LLFloaterMediaSettings::initValues( const LLSD& media_settings, bool editab
sInstance->mPanelMediaSettingsGeneral->getValues( sInstance->mInitialValues );
sInstance->mPanelMediaSettingsSecurity->getValues( sInstance->mInitialValues );
sInstance->mPanelMediaSettingsPermissions->getValues( sInstance->mInitialValues );
sInstance->mApplyBtn->setEnabled(editable);
sInstance->mOKBtn->setEnabled(editable);
}
////////////////////////////////////////////////////////////////////////////////
@ -266,8 +269,11 @@ const std::string LLFloaterMediaSettings::getHomeUrl()
// virtual
void LLFloaterMediaSettings::draw()
{
// Set the enabled state of the "Apply" button if values changed
childSetEnabled( "Apply", haveValuesChanged() );
if (NULL != mApplyBtn)
{
// Set the enabled state of the "Apply" button if values changed
mApplyBtn->setEnabled( haveValuesChanged() );
}
LLFloater::draw();
}

View File

@ -1134,7 +1134,8 @@ void LLFloaterTools::getMediaState()
}
// XXX DISABLE this for now, because when the fetch finally
// does come in, the state of this floater doesn't properly
// update. This needs more thought.
// update. Re-selecting fixes the problem, but there is
// contention as to whether this is a sufficient solution.
// if (object->isMediaDataBeingFetched())
// {
// LL_INFOS("LLFloaterTools: media")

View File

@ -2116,11 +2116,19 @@ viewer_media_t LLVOVolume::getMediaImpl(U8 face_id) const
F64 LLVOVolume::getTotalMediaInterest() const
{
// If this object is currently focused, this object has "high" interest
if (LLViewerMediaFocus::getInstance()->getFocusedObjectID() == getID())
return F64_MAX;
F64 interest = (F64)-1.0; // means not interested;
int i = 0;
// If this object is selected, this object has "high" interest, but since
// there can be more than one, we still add in calculated impl interest
// XXX Sadly, 'contains()' doesn't take a const :(
if (LLSelectMgr::getInstance()->getSelection()->contains(const_cast<LLVOVolume*>(this)))
interest = F64_MAX / 2.0;
int i = 0;
const int end = getNumTEs();
for ( ; i < end; ++i)
{