Automated merge with https://hg.aws.productengine.com/secondlife/viewer-2-0/
--HG-- branch : product-enginemaster
commit
e7af49ce5d
|
|
@ -223,7 +223,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification)
|
|||
|
||||
void LLNearbyChatScreenChannel::arrangeToasts()
|
||||
{
|
||||
if(m_active_toasts.size() == 0 || mIsHovering)
|
||||
if(m_active_toasts.size() == 0 || isHovering())
|
||||
return;
|
||||
|
||||
hideToastsFromScreen();
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ LLScreenChannelBase::LLScreenChannelBase(const LLUUID& id) :
|
|||
,mCanStoreToasts(true)
|
||||
,mHiddenToastsNum(0)
|
||||
,mOverflowToastHidden(false)
|
||||
,mIsHovering(false)
|
||||
,mHoveredToast(NULL)
|
||||
,mControlHovering(false)
|
||||
,mShowToasts(true)
|
||||
{
|
||||
|
|
@ -216,8 +216,10 @@ void LLScreenChannel::deleteToast(LLToast* toast)
|
|||
|
||||
// update channel's Hovering state
|
||||
// turning hovering off manually because onMouseLeave won't happen if a toast was closed using a keyboard
|
||||
if(toast->hasFocus())
|
||||
setHovering(false);
|
||||
if(mHoveredToast == toast)
|
||||
{
|
||||
mHoveredToast = NULL;
|
||||
}
|
||||
|
||||
// close the toast
|
||||
toast->closeFloater();
|
||||
|
|
@ -352,7 +354,7 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel)
|
|||
//--------------------------------------------------------------------------
|
||||
void LLScreenChannel::redrawToasts()
|
||||
{
|
||||
if(mToastList.size() == 0 || mIsHovering)
|
||||
if(mToastList.size() == 0 || isHovering())
|
||||
return;
|
||||
|
||||
hideToastsFromScreen();
|
||||
|
|
@ -649,7 +651,10 @@ void LLScreenChannel::onToastHover(LLToast* toast, bool mouse_enter)
|
|||
// we must check this to prevent incorrect setting for hovering in a channel
|
||||
std::map<LLToast*, bool>::iterator it_first, it_second;
|
||||
S32 stack_size = mToastEventStack.size();
|
||||
mIsHovering = mouse_enter;
|
||||
if(mouse_enter)
|
||||
{
|
||||
mHoveredToast = toast;
|
||||
}
|
||||
|
||||
switch(stack_size)
|
||||
{
|
||||
|
|
@ -661,7 +666,7 @@ void LLScreenChannel::onToastHover(LLToast* toast, bool mouse_enter)
|
|||
if((*it_first).second && !mouse_enter && ((*it_first).first != toast) )
|
||||
{
|
||||
mToastEventStack.clear();
|
||||
mIsHovering = true;
|
||||
mHoveredToast = toast;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -673,7 +678,7 @@ void LLScreenChannel::onToastHover(LLToast* toast, bool mouse_enter)
|
|||
LL_ERRS ("LLScreenChannel::onToastHover: stack size error " ) << stack_size << llendl;
|
||||
}
|
||||
|
||||
if(!mIsHovering)
|
||||
if(!isHovering())
|
||||
redrawToasts();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,9 +93,10 @@ public:
|
|||
// Channel's behavior-functions
|
||||
// set whether a channel will control hovering inside itself or not
|
||||
virtual void setControlHovering(bool control) { mControlHovering = control; }
|
||||
// set Hovering flag for a channel
|
||||
virtual void setHovering(bool hovering) { mIsHovering = hovering; }
|
||||
|
||||
|
||||
bool isHovering() { return mHoveredToast != NULL; }
|
||||
|
||||
void setCanStoreToasts(bool store) { mCanStoreToasts = store; }
|
||||
|
||||
void setDisplayToastsAlways(bool display_toasts) { mDisplayToastsAlways = display_toasts; }
|
||||
|
|
@ -117,7 +118,7 @@ public:
|
|||
protected:
|
||||
// Channel's flags
|
||||
bool mControlHovering;
|
||||
bool mIsHovering;
|
||||
LLToast* mHoveredToast;
|
||||
bool mCanStoreToasts;
|
||||
bool mDisplayToastsAlways;
|
||||
bool mOverflowToastHidden;
|
||||
|
|
|
|||
Loading…
Reference in New Issue