summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaceinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelplaceinfo.cpp')
-rw-r--r--indra/newview/llpanelplaceinfo.cpp43
1 files changed, 31 insertions, 12 deletions
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp
index 5bbcf4207f..590eae555e 100644
--- a/indra/newview/llpanelplaceinfo.cpp
+++ b/indra/newview/llpanelplaceinfo.cpp
@@ -235,27 +235,46 @@ void LLPanelPlaceInfo::setInfoType(INFO_TYPE type)
if (!mInfoPanel)
return;
- if (type == PLACE)
+ switch(type)
{
- mCurrentTitle = getString("title_place");
- }
- else
- {
- mCurrentTitle = getString("title_landmark");
+ case PLACE:
+ mCurrentTitle = getString("title_place");
+
+ if (!isMediaPanelVisible())
+ {
+ mTitle->setText(mCurrentTitle);
+ }
+ break;
+
+ // Hide Media Panel if showing information about
+ // a landmark or a teleport history item
+ case LANDMARK:
+ mCurrentTitle = getString("title_landmark");
+
+ toggleMediaPanel(FALSE);
+ break;
+
+ case TELEPORT_HISTORY:
+ mCurrentTitle = getString("title_place");
+
+ toggleMediaPanel(FALSE);
+ break;
}
+}
+
+BOOL LLPanelPlaceInfo::isMediaPanelVisible()
+{
+ if (!mMediaPanel)
+ return FALSE;
- if (mInfoPanel->getVisible())
- {
- mTitle->setText(mCurrentTitle);
- }
+ return mMediaPanel->getVisible();
}
-void LLPanelPlaceInfo::toggleMediaPanel()
+void LLPanelPlaceInfo::toggleMediaPanel(BOOL visible)
{
if (!(mMediaPanel && mInfoPanel))
return;
- bool visible = mInfoPanel->getVisible();
if (visible)
{
mTitle->setText(getString("title_media"));