diff options
| author | Oz Linden <oz@lindenlab.com> | 2013-01-17 13:54:39 -0500 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2013-01-17 13:54:39 -0500 |
| commit | 841dc5da2ef9626fa4ab9255681d217df62a6b0b (patch) | |
| tree | 2c5bacebcb27b78d318b6e162334488f6e515974 /indra/llui/llview.cpp | |
| parent | b7f8a2479249646c7fb38ead195d5197ab733c94 (diff) | |
| parent | d16757545c91d4f7dac3c52a311ad0f0239052e1 (diff) | |
merge up to 3.4.4
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 |
