From b5ffeaff1ab53008a8f1ee72cd1f398bd1ff21c2 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Wed, 14 Oct 2009 20:37:03 +0000 Subject: merge -r 2014-2032 https://svn.aws.productengine.com/secondlife/pe/stable-2 -> viewer-2.0.0-3 * Bugs: EXT-1005 EXT-1488 EXT-320 EXT-1236 EXT-1236 EXT-1002 EXT-1030 * New Dev: EXT-1293 EXT-1416 --- indra/newview/llchiclet.cpp | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) (limited to 'indra/newview/llchiclet.cpp') 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( + "impanel", (*it)->getSessionId()); + if (im_floater != NULL && im_floater->getVisible() + && !im_floater->isMinimized() && im_floater->isDocked()) + { + res = true; + break; + } + } + + return res; +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3