summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterworldmap.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2022-03-23 15:35:10 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2022-03-23 15:37:58 +0200
commitb3cd910e759bf2d0755526e0cc4972a19405ff6b (patch)
tree249122c203fe0292f1058d8e6b672eeada0de49f /indra/newview/llfloaterworldmap.cpp
parent4e536adea7acab1ea684ccb1945a6dbd1b52e546 (diff)
SL-17037 Center map on current location after teleporting
Diffstat (limited to 'indra/newview/llfloaterworldmap.cpp')
-rw-r--r--indra/newview/llfloaterworldmap.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 6ca134ecd3..3ec1e17bd8 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -61,6 +61,7 @@
#include "lltrans.h"
#include "llviewerinventory.h" // LLViewerInventoryItem
#include "llviewermenu.h"
+#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "llviewerstats.h"
#include "llviewertexture.h"
@@ -330,6 +331,8 @@ LLFloaterWorldMap::~LLFloaterWorldMap()
mFriendObserver = NULL;
gFloaterWorldMap = NULL;
+
+ mTeleportFinishConnection.disconnect();
}
//static
@@ -343,12 +346,16 @@ void LLFloaterWorldMap::onClose(bool app_quitting)
{
// While we're not visible, discard the overlay images we're using
LLWorldMap::getInstance()->clearImageRefs();
+ mTeleportFinishConnection.disconnect();
}
// virtual
void LLFloaterWorldMap::onOpen(const LLSD& key)
{
- bool center_on_target = (key.asString() == "center");
+ mTeleportFinishConnection = LLViewerParcelMgr::getInstance()->
+ setTeleportFinishedCallback(boost::bind(&LLFloaterWorldMap::onTeleportFinished, this));
+
+ bool center_on_target = (key.asString() == "center");
mIsClosing = FALSE;
@@ -1570,6 +1577,13 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
}
}
+void LLFloaterWorldMap::onTeleportFinished()
+{
+ if(isInVisibleChain())
+ {
+ LLWorldMapView::setPan(0, 0, TRUE);
+ }
+}
void LLFloaterWorldMap::onCommitSearchResult()
{