diff options
author | William Todd Stinson <stinson@lindenlab.com> | 2012-11-21 15:07:17 -0800 |
---|---|---|
committer | William Todd Stinson <stinson@lindenlab.com> | 2012-11-21 15:07:17 -0800 |
commit | ea0461c01287a2b026b5621616fb811bfc2d68a2 (patch) | |
tree | f1e94df52aa6f5a68f008278cbaec0eaca063a4a /indra/llui/llview.cpp | |
parent | 76990fab4f3c73ab1b2051421c52444de28f9d32 (diff) | |
parent | a830812172d7eb163c06ead3155dc4b43ded4346 (diff) |
Pull and merge https://bitbucket.org/lindenlab/viewer-development.
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r-- | indra/llui/llview.cpp | 12 |
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 |