diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-05-27 14:31:39 -0400 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-05-27 14:31:39 -0400 |
| commit | 4fdf70d2135c7ec0cb8d8067d4f916b1c9a1dda7 (patch) | |
| tree | 466cf9f78f159065fff714f5a99247c1ba12ecd1 /indra/newview/llworldview.cpp | |
| parent | 670e316dd78e386e5d52da3162d87e0333b29d8a (diff) | |
| parent | e5273960de222ffae32405fde8e9fd566ff72d0a (diff) | |
merge
Diffstat (limited to 'indra/newview/llworldview.cpp')
| -rw-r--r-- | indra/newview/llworldview.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/indra/newview/llworldview.cpp b/indra/newview/llworldview.cpp index 665cc74a87..b44a365677 100644 --- a/indra/newview/llworldview.cpp +++ b/indra/newview/llworldview.cpp @@ -44,18 +44,24 @@ static LLDefaultChildRegistry::Register<LLWorldView> r("world_view"); LLWorldView::LLWorldView(const Params& p) : LLUICtrl (p) { + gSavedSettings.getControl("SidebarCameraMovement")->getSignal()->connect(boost::bind(&LLWorldView::toggleSidebarCameraMovement, this, _2)); } void LLWorldView::reshape(S32 width, S32 height, BOOL called_from_parent) { - if (FALSE == gSavedSettings.getBOOL("SidebarCameraMovement") ) - { - LLView* main_view = LLUI::getRootView()->findChild<LLView>("main_view"); - if(main_view) - { - width = main_view->getRect().getWidth(); - } - } + //if (FALSE == gSavedSettings.getBOOL("SidebarCameraMovement") ) + //{ + // LLView* main_view = LLUI::getRootView()->findChild<LLView>("main_view"); + // if(main_view) + // { + // width = main_view->getRect().getWidth(); + // } + //} LLUICtrl::reshape(width, height, called_from_parent); } +void LLWorldView::toggleSidebarCameraMovement(const LLSD::Boolean& new_visibility) +{ + reshape(getParent()->getRect().getWidth(),getRect().getHeight()); +} + |
