summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaceinfo.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-07-21 00:57:23 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-07-21 00:57:23 +0000
commit73a97010e6c8c7874fdc1778ab46e492f77d9394 (patch)
treef0c8efb1cebcc6157c8e6678cf0eb39b5792a1d7 /indra/newview/llpanelplaceinfo.cpp
parentdedb5be906b53d1ea8601ff6b9c4b726fda02da8 (diff)
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0/indra@1059 https://svn.aws.productengine.com/secondlife/pe/stable-1/indra@1070 -> svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3
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"));