summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelnearbymedia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelnearbymedia.cpp')
-rw-r--r--indra/newview/llpanelnearbymedia.cpp29
1 files changed, 12 insertions, 17 deletions
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index fcc67d6840..2bbd15ae11 100644
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -356,7 +356,7 @@ void LLPanelNearByMedia::updateListItem(LLScrollListItem* item, LLViewerMediaImp
debug_str += llformat("%g/", (float)impl->getInterest());
// proximity distance is actually distance squared -- display it as straight distance.
- debug_str += llformat("%g/", fsqrtf(impl->getProximityDistance()));
+ debug_str += llformat("%g/", (F32) sqrt(impl->getProximityDistance()));
// s += llformat("%g/", (float)impl->getCPUUsage());
// s += llformat("%g/", (float)impl->getApproximateTextureInterest());
@@ -564,16 +564,14 @@ void LLPanelNearByMedia::refreshParcelItems()
if (NULL != mParcelMediaItem)
{
std::string name, url, tooltip;
- if (!LLViewerParcelMgr::getInstance()->getAgentParcel()->getObscureMedia())
+ getNameAndUrlHelper(LLViewerParcelMedia::getParcelMedia(), name, url, "");
+ if (name.empty() || name == url)
{
- getNameAndUrlHelper(LLViewerParcelMedia::getParcelMedia(), name, url, "");
- if (name.empty() || name == url)
- {
- tooltip = url;
- }
- else {
- tooltip = name + " : " + url;
- }
+ tooltip = url;
+ }
+ else
+ {
+ tooltip = name + " : " + url;
}
LLViewerMediaImpl *impl = LLViewerParcelMedia::getParcelMedia();
updateListItem(mParcelMediaItem,
@@ -611,10 +609,8 @@ void LLPanelNearByMedia::refreshParcelItems()
bool is_playing = LLViewerMedia::isParcelAudioPlaying();
std::string url;
- if (!LLViewerParcelMgr::getInstance()->getAgentParcel()->getObscureMusic())
- {
- url = LLViewerMedia::getParcelAudioURL();
- }
+ url = LLViewerMedia::getParcelAudioURL();
+
updateListItem(mParcelAudioItem,
mParcelAudioName,
url,
@@ -958,7 +954,7 @@ void LLPanelNearByMedia::onAdvancedButtonClick()
void LLPanelNearByMedia::onMoreLess()
{
- bool is_more = getChild<LLUICtrl>("more_btn")->getVisible();
+ bool is_more = getChild<LLButton>("more_btn")->getToggleState();
mNearbyMediaPanel->setVisible(is_more);
// enable resizing when expanded
@@ -969,8 +965,7 @@ void LLPanelNearByMedia::onMoreLess()
setShape(new_rect);
- getChild<LLUICtrl>("more_btn")->setVisible(!is_more);
- getChild<LLUICtrl>("less_btn")->setVisible(is_more);
+ getChild<LLUICtrl>("more_btn")->setVisible(true);
}
void LLPanelNearByMedia::updateControls()