summaryrefslogtreecommitdiff
path: root/indra/llui/llview.cpp
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-11-19 16:27:14 -0800
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-11-19 16:27:14 -0800
commitc4c5d3c9d33055a39616ca02a31d9c0a53446005 (patch)
treeeefb7200cf2e2bf0940e5d9f334c6f80e07a294d /indra/llui/llview.cpp
parent62301cb883dd6fadcd5d30acd604f72d2c0b1794 (diff)
parentcca22d608deb26cf21b33629b170e70a0e221575 (diff)
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-beta.
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r--indra/llui/llview.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 54843227b7..ad9bec9f61 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -1549,16 +1549,18 @@ void LLView::screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* l
void LLView::localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const
{
- *screen_x = local_x + getRect().mLeft;
- *screen_y = local_y + getRect().mBottom;
+ *screen_x = local_x;
+ *screen_y = local_y;
const LLView* cur = this;
- while( cur->mParentView )
+ do
{
+ LLRect cur_rect = cur->getRect();
+ *screen_x += cur_rect.mLeft;
+ *screen_y += cur_rect.mBottom;
cur = cur->mParentView;
- *screen_x += cur->getRect().mLeft;
- *screen_y += cur->getRect().mBottom;
}
+ while( cur );
}
void LLView::screenRectToLocal(const LLRect& screen, LLRect* local) const