summaryrefslogtreecommitdiff
path: root/indra/newview/llchiclet.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-10-14 20:37:03 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-10-14 20:37:03 +0000
commitb5ffeaff1ab53008a8f1ee72cd1f398bd1ff21c2 (patch)
treee12431a5c6945b2ece16765bcdb04c241c4d9a96 /indra/newview/llchiclet.cpp
parent7475ec05fc81e358a6979f3e9d7050ab91511c57 (diff)
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
Diffstat (limited to 'indra/newview/llchiclet.cpp')
-rw-r--r--indra/newview/llchiclet.cpp34
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;
+}
+
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////