diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-06-30 19:27:22 +0300 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-06-30 19:27:22 +0300 |
commit | aabffa4d082d688c1e13105266a9093f7905db3f (patch) | |
tree | ddcfc54bb0a5cbddb0e61df74520829ea93f0cea /indra | |
parent | 14b122380ec8532dedc0b41c765c1849f09a92d0 (diff) |
EXT-8045 FIX check if sidetray is created
reviewed by Alexei Arabadji at https://codereview.productengine.com/secondlife/r/668/
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llchannelmanager.h | 1 | ||||
-rw-r--r-- | indra/newview/llscreenchannel.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llsidetray.cpp | 13 |
3 files changed, 19 insertions, 2 deletions
diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h index 8c725f2660..2d6aa181c5 100644 --- a/indra/newview/llchannelmanager.h +++ b/indra/newview/llchannelmanager.h @@ -119,6 +119,7 @@ public: */ static LLNotificationsUI::LLScreenChannel* getNotificationScreenChannel(); + std::vector<ChannelElem>& getChannelList() { return mChannelList;} private: LLScreenChannel* createChannel(LLChannelManager::Params& p); diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 55c8809184..ef89c07c60 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -136,8 +136,11 @@ void LLScreenChannelBase::updatePositionAndSize(LLRect old_world_rect, LLRect ne void LLScreenChannelBase::init(S32 channel_left, S32 channel_right) { - LLSideTray* side_bar = LLSideTray::getInstance(); - side_bar->getCollapseSignal().connect(boost::bind(&LLScreenChannelBase::resetPositionAndSize, this, _2)); + if(LLSideTray::instanceCreated()) + { + LLSideTray* side_bar = LLSideTray::getInstance(); + side_bar->getCollapseSignal().connect(boost::bind(&LLScreenChannelBase::resetPositionAndSize, this, _2)); + } S32 channel_top = gViewerWindow->getWorldViewRectScaled().getHeight(); S32 channel_bottom = gViewerWindow->getWorldViewRectScaled().mBottom + gSavedSettings.getS32("ChannelBottomPanelMargin"); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index fed39c362e..98282c1673 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -49,12 +49,15 @@ #include "llfloater.h" //for gFloaterView #include "lliconctrl.h"//for OpenClose tab icon #include "llsidetraypanelcontainer.h" +#include "llscreenchannel.h" +#include "llchannelmanager.h" #include "llwindow.h"//for SetCursor #include "lltransientfloatermgr.h" //#include "llscrollcontainer.h" using namespace std; +using namespace LLNotificationsUI; static LLRootViewRegistry::Register<LLSideTray> t1("side_tray"); static LLDefaultChildRegistry::Register<LLSideTrayTab> t2("sidetray_tab"); @@ -276,6 +279,16 @@ BOOL LLSideTray::postBuild() LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSideTray::handleLoginComplete, this)); + //EXT-8045 + //connect all already created channels to reflect sidetray collapse/expand + std::vector<LLChannelManager::ChannelElem>& channels = LLChannelManager::getInstance()->getChannelList(); + for(std::vector<LLChannelManager::ChannelElem>::iterator it = channels.begin();it!=channels.end();++it) + { + if ((*it).channel) + { + getCollapseSignal().connect(boost::bind(&LLScreenChannelBase::resetPositionAndSize, (*it).channel, _2)); + } + } return true; } |