diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-16 16:42:45 -0700 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-16 16:42:45 -0700 |
commit | 3e10fa4d51a23bf6f1ced23e8d90c636d84fa5db (patch) | |
tree | d4991e4c1a9dd934f48d33804e55eb8ffa085679 /indra/newview/llchiclet.cpp | |
parent | e9f7205ba9f4dfb3422759218609b62d61972722 (diff) | |
parent | f20e9521a9b70f4e83cbb6888feae08a70681ea7 (diff) |
merge from latest svn/viewer-2-0 to hg/viewer-2-0
Diffstat (limited to 'indra/newview/llchiclet.cpp')
-rw-r--r-- | indra/newview/llchiclet.cpp | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 23664fa6d6..340b0fa22c 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -763,15 +763,14 @@ bool LLChicletPanel::addChiclet(LLChiclet* chiclet, S32 index) if(mScrollArea->addChild(chiclet)) { S32 offset = 0; - // Do not scroll chiclets if chiclets are scrolled right and new - // chiclet is added to the beginning of the list - if(canScrollLeft()) + + // if index == 0 and chickelt list isn't empty insert chiclet before first in the list + // without scrolling, so other visible chicklets aren't change screen position + if (0 == index && !mChicletList.empty()) { - offset = - (chiclet->getRequiredRect().getWidth() + getChicletPadding()); - if(0 == index) - { - offset += getChiclet(0)->getRect().mLeft; - } + offset = getChiclet(0)->getRect().mLeft + - (chiclet->getRequiredRect().getWidth() + + getChicletPadding()); } mChicletList.insert(mChicletList.begin() + index, chiclet); @@ -1128,6 +1127,25 @@ BOOL LLChicletPanel::handleScrollWheel(S32 x, S32 y, S32 clicks) return TRUE; } +bool LLChicletPanel::isAnyIMFloaterDoked() +{ + bool res = false; + for (chiclet_list_t::iterator it = mChicletList.begin(); it + != mChicletList.end(); it++) + { + LLIMFloater* im_floater = LLFloaterReg::findTypedInstance<LLIMFloater>( + "impanel", (*it)->getSessionId()); + if (im_floater != NULL && im_floater->getVisible() + && !im_floater->isMinimized() && im_floater->isDocked()) + { + res = true; + break; + } + } + + return res; +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// |