summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-03-18 19:56:24 +0200
committerAlexei Arabadji <aarabadji@productengine.com>2010-03-18 19:56:24 +0200
commit1bf989705cf33fa27e404743108c6920cf33a7f2 (patch)
tree7ebfcc82efbab8104d48cbc5b3852745042abab7 /indra
parent76dc796a1a70290b00c47d0c43d8c8ba237dd7ac (diff)
fixed EXT-5630 “nearby chat flickers when top line fades out”,
used reverse order to provide correct z-order and avoid toast blinking caused by z-reordering; reviewed by Vadim at https://codereview.productengine.com/secondlife/r/57/
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llnearbychathandler.cpp33
1 files changed, 16 insertions, 17 deletions
diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp
index 08ae93c3a6..e199f9f180 100644
--- a/indra/newview/llnearbychathandler.cpp
+++ b/indra/newview/llnearbychathandler.cpp
@@ -268,24 +268,23 @@ void LLNearbyChatScreenChannel::showToastsBottom()
}
break;
}
- else
- {
- toast_rect = toast->getRect();
- toast_rect.setLeftTopAndSize(getRect().mLeft , toast_top, toast_rect.getWidth() ,toast_rect.getHeight());
-
- toast->setRect(toast_rect);
- toast->setIsHidden(false);
- toast->setVisible(TRUE);
+ bottom = toast_top - toast->getTopPad();
+ }
- if(!toast->hasFocus())
- {
- // Fixing Z-order of toasts (EXT-4862)
- // Next toast will be positioned under this one.
- gFloaterView->sendChildToBack(toast);
- }
-
- bottom = toast->getRect().mTop - toast->getTopPad();
- }
+ // use reverse order to provide correct z-order and avoid toast blinking
+ for(std::vector<LLToast*>::reverse_iterator it = m_active_toasts.rbegin(); it != m_active_toasts.rend(); ++it)
+ {
+ LLToast* toast = (*it);
+ S32 toast_top = bottom + toast->getTopPad();
+
+ toast_rect = toast->getRect();
+ toast_rect.setLeftTopAndSize(getRect().mLeft , toast_top, toast_rect.getWidth() ,toast_rect.getHeight());
+
+ toast->setRect(toast_rect);
+ toast->setIsHidden(false);
+ toast->setVisible(TRUE);
+
+ bottom = toast->getRect().mBottom - margin;
}
}