diff options
| author | simon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com> | 2012-12-04 14:31:15 -0800 |
|---|---|---|
| committer | simon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com> | 2012-12-04 14:31:15 -0800 |
| commit | 40e78a80cc293874216cdc8730d93cba8e987052 (patch) | |
| tree | 1d16ec375ef2b0dfd9c7a3363cd46575c457a033 /indra/llui/llview.cpp | |
| parent | 18e20ca6f2cb7d51d4d7e7d9566b0018025a91cc (diff) | |
| parent | f5a47417fde70f78b99744386c6da0bcf78e60d5 (diff) | |
Pull and merge 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 |
