summaryrefslogtreecommitdiff
path: root/indra
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
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')
-rw-r--r--indra/newview/llfavoritesbar.cpp18
-rw-r--r--indra/newview/lllandmarkactions.cpp4
-rw-r--r--indra/newview/lllandmarkactions.h2
3 files changed, 18 insertions, 6 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);
}
diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp
index e0dc1b6f0f..003afafa87 100644
--- a/indra/newview/lllandmarkactions.cpp
+++ b/indra/newview/lllandmarkactions.cpp
@@ -324,7 +324,7 @@ void LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(const LLVector3d& gl
{
LLVector3 pos = sim_infop->getLocalPos(global_pos);
std::string name = sim_infop->getName() ;
- cb(name, llround(pos.mV[VX]), llround(pos.mV[VY]));
+ cb(name, llround(pos.mV[VX]), llround(pos.mV[VY]),llround(pos.mV[VZ]));
}
else
{
@@ -368,7 +368,7 @@ void LLLandmarkActions::onRegionResponseNameAndCoords(region_name_and_coords_cal
{
LLVector3 local_pos = sim_infop->getLocalPos(global_pos);
std::string name = sim_infop->getName() ;
- cb(name, llround(local_pos.mV[VX]), llround(local_pos.mV[VY]));
+ cb(name, llround(local_pos.mV[VX]), llround(local_pos.mV[VY]), llround(local_pos.mV[VZ]));
}
}
diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h
index 1c524c820c..c65b831f3e 100644
--- a/indra/newview/lllandmarkactions.h
+++ b/indra/newview/lllandmarkactions.h
@@ -43,7 +43,7 @@ class LLLandmarkActions
{
public:
typedef boost::function<void(std::string& slurl)> slurl_callback_t;
- typedef boost::function<void(std::string& slurl, S32 x, S32 y)> region_name_and_coords_callback_t;
+ typedef boost::function<void(std::string& slurl, S32 x, S32 y, S32 z)> region_name_and_coords_callback_t;
/**
* @brief Fetches landmark LLViewerInventoryItems for the given landmark name.