summaryrefslogtreecommitdiff
path: root/indra/newview/llfavoritesbar.cpp
diff options
context:
space:
mode:
authorAndrew Dyukov <adyukov@productengine.com>2009-11-16 13:15:09 +0200
committerAndrew Dyukov <adyukov@productengine.com>2009-11-16 13:15:09 +0200
commit602921ba2d70f39cee6f19946b5d9a43d3cd8f33 (patch)
tree24148abf8701318d962f852ee2b45c5d95f97ad1 /indra/newview/llfavoritesbar.cpp
parente7519e8a977138627b429ca43a10184c82efc66e (diff)
Fixed normal bug EXT-2452 (Favorites Bar tooltip shows only 2 out of 3 coordinates).
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llfavoritesbar.cpp')
-rw-r--r--indra/newview/llfavoritesbar.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index 01603f390d..ae5be8cc7c 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -74,6 +74,7 @@ public:
mName("(Loading...)"),
mPosX(0),
mPosY(0),
+ mPosZ(0),
mLoaded(false)
{}
@@ -101,6 +102,14 @@ public:
requestNameAndPos();
return mPosY;
}
+
+ S32 getPosZ()
+ {
+ if (!mLoaded)
+ requestNameAndPos();
+ return mPosZ;
+ }
+
private:
/**
* Requests landmark data from server.
@@ -114,14 +123,15 @@ private:
if(LLLandmarkActions::getLandmarkGlobalPos(mLandmarkID, g_pos))
{
LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(g_pos,
- boost::bind(&LLLandmarkInfoGetter::landmarkNameCallback, this, _1, _2, _3));
+ boost::bind(&LLLandmarkInfoGetter::landmarkNameCallback, this, _1, _2, _3, _4));
}
}
- void landmarkNameCallback(const std::string& name, S32 x, S32 y)
+ void landmarkNameCallback(const std::string& name, S32 x, S32 y, S32 z)
{
mPosX = x;
mPosY = y;
+ mPosZ = z;
mName = name;
mLoaded = true;
}
@@ -130,6 +140,7 @@ private:
std::string mName;
S32 mPosX;
S32 mPosY;
+ S32 mPosZ;
bool mLoaded;
};
@@ -151,7 +162,8 @@ public:
if (!region_name.empty())
{
LLToolTip::Params params;
- params.message = llformat("%s\n%s (%d, %d)", getLabelSelected().c_str(), region_name.c_str(), mLandmarkInfoGetter.getPosX(), mLandmarkInfoGetter.getPosY());
+ params.message = llformat("%s\n%s (%d, %d, %d)", getLabelSelected().c_str(), region_name.c_str(),
+ mLandmarkInfoGetter.getPosX(), mLandmarkInfoGetter.getPosY(), mLandmarkInfoGetter.getPosZ());
params.sticky_rect = calcScreenRect();
LLToolTipMgr::instance().show(params);
}