summaryrefslogtreecommitdiff
path: root/indra/llui/llview.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-11-26 15:01:57 -0800
committerMerov Linden <merov@lindenlab.com>2012-11-26 15:01:57 -0800
commit8076f7a33d7f5ee93d4ba8f71a7ba0fed5e364a7 (patch)
tree6a7d0f88666e16948e73d1098c99edc7513b6e49 /indra/llui/llview.cpp
parent7ca2508cc2adcdc5201bd53e814246e156bc6013 (diff)
parent890965faf5baa5f6f832e086991d59bb8d33b7bc (diff)
Pull merge from richard/viewer-chui
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 8323bfc12f..5bcdae921d 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -1548,16 +1548,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