From 39905b927d60e204438705728d2c214cb3f9ef81 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Thu, 2 Jul 2009 00:38:13 +0000 Subject: merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@873 https://svn.aws.productengine.com/secondlife/pe/stable@888 -> viewer-2.0.0-pe-4 --- indra/newview/llpanelteleporthistory.cpp | 40 ++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'indra/newview/llpanelteleporthistory.cpp') diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index eb35834dc0..c271ca34b9 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -92,8 +92,15 @@ void LLTeleportHistoryPanel::onShowOnMap() S32 index = itemp->getColumn(LIST_INDEX)->getValue().asInteger(); - // teleport to existing item in history, so we don't add it again - mTeleportHistory->goToItem(index); + const LLTeleportHistory::slurl_list_t& hist_items = mTeleportHistory->getItems(); + + LLVector3d global_pos = hist_items[index].mGlobalPos; + + if (!global_pos.isExactlyZero()) + { + LLFloaterWorldMap::getInstance()->trackLocation(global_pos); + LLFloaterReg::showInstance("world_map", "center"); + } } // virtual @@ -104,7 +111,8 @@ void LLTeleportHistoryPanel::onTeleport() return; S32 index = itemp->getColumn(LIST_INDEX)->getValue().asInteger(); - + + // teleport to existing item in history, so we don't add it again mTeleportHistory->goToItem(index); } @@ -132,6 +140,23 @@ void LLTeleportHistoryPanel::onCopySLURL() } */ +// virtual +void LLTeleportHistoryPanel::updateVerbs() +{ + S32 index = 0; + S32 cur_item = 0; + + LLScrollListItem* itemp = mHistoryItems->getFirstSelected(); + if (itemp) + { + index = itemp->getColumn(LIST_INDEX)->getValue().asInteger(); + cur_item = mTeleportHistory->getCurrentItemIndex(); + } + + mTeleportBtn->setEnabled(index != cur_item); + mShowOnMapBtn->setEnabled(itemp != NULL); +} + void LLTeleportHistoryPanel::showTeleportHistory() { const LLTeleportHistory::slurl_list_t& hist_items = mTeleportHistory->getItems(); @@ -181,17 +206,12 @@ void LLTeleportHistoryPanel::showTeleportHistory() } } - togglePanelPlacesButtons(mHistoryItems->getFirstSelected() != NULL); + updateVerbs(); } void LLTeleportHistoryPanel::handleItemSelect(const LLSD& data) { - LLScrollListItem* itemp = mHistoryItems->getFirstSelected(); - - if (!itemp) - return; - - togglePanelPlacesButtons(TRUE); + updateVerbs(); } //static -- cgit v1.2.3 From f26f7e3e29019abf3a10f6925e30baca19eb4e2d Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Wed, 8 Jul 2009 05:19:19 +0000 Subject: merge -r 889-936 https://svn.aws.productengine.com/secondlife/pe/stable/ -> viewer-2-0 Also: * Moved media remote shortcut to Communicate menu * Changed mini map menu to toggle instead of show --- indra/newview/llpanelteleporthistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpanelteleporthistory.cpp') diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index c271ca34b9..77edae261b 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -224,7 +224,7 @@ void LLTeleportHistoryPanel::onDoubleClickItem(void* user_data) return; LLSD key; - key["type"] = LLPanelPlaces::TELEPORT_HISTORY; + key["type"] = "teleport_history"; key["id"] = itemp->getColumn(LIST_INDEX)->getValue().asInteger(); LLSideTray::getInstance()->showPanel("panel_places", key); -- cgit v1.2.3 From e97f7728a90dd66014f6b3f0cd5e8d4c71f48691 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Thu, 30 Jul 2009 23:22:41 +0000 Subject: merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0/indra@1170 https://svn.aws.productengine.com/secondlife/pe/stable-1/indra@1187 -> viewer-2.0.0-3 --- indra/newview/llpanelteleporthistory.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llpanelteleporthistory.cpp') diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 77edae261b..51cd05376a 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -143,6 +143,9 @@ void LLTeleportHistoryPanel::onCopySLURL() // virtual void LLTeleportHistoryPanel::updateVerbs() { + if (!isTabVisible()) + return; + S32 index = 0; S32 cur_item = 0; -- cgit v1.2.3