From f87fd1c19b1e409b9d245bdde25a919287e3b3da Mon Sep 17 00:00:00 2001 From: JessicaLyon Date: Mon, 14 Feb 2011 11:57:15 -0500 Subject: [PATCH] Backed out changeset: 047a378b7ae6 Causing infinite loop into an eventual stack heap overflow --- indra/newview/llimfloatercontainer.cpp | 36 +++----------------------- indra/newview/llnearbychat.cpp | 14 ++-------- 2 files changed, 5 insertions(+), 45 deletions(-) diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index fb075e0213..e0b6f20eba 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -38,7 +38,6 @@ #include "llnearbychat.h" #include "fscontactsfloater.h" #include "llfloater.h" -#include "llviewercontrol.h" // // LLIMFloaterContainer @@ -77,18 +76,7 @@ void LLIMFloaterContainer::onOpen(const LLSD& key) LLFloater* floater = LLNearbyChat::getInstance(); if (! LLFloater::isVisible(floater)) { - if (gSavedSettings.getBOOL("ChatHistoryTornOff")) - { - // add then remove to set up relationship for re-attach - addFloater(floater, FALSE); - removeFloater(floater); - // reparent to floater view - gFloaterView->addChild(floater); - } - else - { - addFloater(floater, FALSE); - } + LLMultiFloater::showFloater(floater, LLTabContainer::START); } @@ -110,8 +98,6 @@ void LLIMFloaterContainer::removeFloater(LLFloater* floaterp) { // only my friends floater now locked mTabContainer->lockTabs(mTabContainer->getNumLockedTabs() - 1); - gSavedSettings.setBOOL("ChatHistoryTornOff", TRUE); - floaterp->setCanClose(TRUE); } else if (floaterp->getName() == "imcontacts") { @@ -140,28 +126,12 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, mTabContainer->unlockTabs(); // add contacts window as first tab if (floaterp->getName() == "imcontacts") - { LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::START); - } else - { - // add chat history as second tab if contact window is present, first tab otherwise - if (getChildView("imcontacts")) - { - // assuming contacts window is first tab, select it - mTabContainer->selectFirstTab(); - // and add ourselves after - LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::RIGHT_OF_CURRENT); - } - else - { - LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::START); - } - gSavedSettings.setBOOL("ChatHistoryTornOff", FALSE); - } + LLMultiFloater::addFloater(floaterp, select_added_floater, LLTabContainer::RIGHT_OF_CURRENT); // make sure first two tabs are now locked mTabContainer->lockTabs(num_locked_tabs + 1); - + //gSavedSettings.setBOOL("ContactsTornOff", FALSE); floaterp->setCanClose(FALSE); return; } diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index ea899da973..57ffedd697 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -147,20 +147,10 @@ BOOL LLNearbyChat::postBuild() if (getDockControl() == NULL) { LLIMFloaterContainer* floater_container = LLIMFloaterContainer::getInstance(); + LLTabContainer::eInsertionPoint i_pt = LLTabContainer::START; if (floater_container) { - if (gSavedSettings.getBOOL("ChatHistoryTornOff")) - { - // add then remove to set up relationship for re-attach - floater_container->addFloater(this, FALSE); - floater_container->removeFloater(this); - // reparent to floater view - gFloaterView->addChild(this); - } - else - { - floater_container->addFloater(this, FALSE); - } + floater_container->addFloater(this, TRUE, i_pt); } }