summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2009-12-09 11:30:28 -0800
committerRick Pasetto <rick@lindenlab.com>2009-12-09 11:30:28 -0800
commit75a5f3c52ea6d7df23251991d658baccf3771fa0 (patch)
treecd1f0bdc9dbbca841408f2648b7aa63dfaab1620 /indra
parentfe7c6b97be1621c74a570d27b292c4c1bf9686c8 (diff)
Follow-up to previous change: slider control should only be set when focus changes
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelprimmediacontrols.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index b4cc1b78ad..3fe51106e4 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -200,7 +200,7 @@ BOOL LLPanelPrimMediaControls::postBuild()
mScrollDownCtrl->setHeldDownCallback(onScrollDownHeld, this);
mScrollDownCtrl->setMouseUpCallback(onScrollStop, this);
}
-
+
mMediaAddress->setFocusReceivedCallback(boost::bind(&LLPanelPrimMediaControls::onInputURL, _1, this ));
mInactiveTimeout = gSavedSettings.getF32("MediaControlTimeout");
mControlFadeTime = gSavedSettings.getF32("MediaControlFadeTime");
@@ -215,11 +215,15 @@ void LLPanelPrimMediaControls::setMediaFace(LLPointer<LLViewerObject> objectp, S
{
if (media_impl.notNull() && objectp.notNull())
{
+ LLUUID prev_id = mTargetImplID;
mTargetImplID = media_impl->getMediaTextureID();
mTargetObjectID = objectp->getID();
mTargetObjectFace = face;
mTargetObjectNormal = pick_normal;
mClearFaceOnFade = false;
+
+ if (prev_id != mTargetImplID)
+ mVolumeSliderCtrl->setValue(media_impl->getVolume());
}
else
{
@@ -407,14 +411,12 @@ void LLPanelPrimMediaControls::updateShape()
{
mVolumeUpCtrl->setEnabled(TRUE);
mVolumeDownCtrl->setEnabled(FALSE);
- media_impl->setVolume(0.0);
mMuteBtn->setToggleState(true);
}
else if (volume >= 1.0)
{
mVolumeUpCtrl->setEnabled(FALSE);
mVolumeDownCtrl->setEnabled(TRUE);
- media_impl->setVolume(1.0);
mMuteBtn->setToggleState(false);
}
else
@@ -423,7 +425,6 @@ void LLPanelPrimMediaControls::updateShape()
mVolumeUpCtrl->setEnabled(TRUE);
mVolumeDownCtrl->setEnabled(TRUE);
}
- mVolumeSliderCtrl->setValue(volume);
switch(result)
{