summaryrefslogtreecommitdiff
path: root/indra/newview/llworldview.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-06-02 11:09:17 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-06-02 11:09:17 -0700
commit28d23e8c85ba6073cffbd3597342c43f4f9c7971 (patch)
tree8e817fa78c67ffe686d57f4889016623dfeffab2 /indra/newview/llworldview.cpp
parentb742f0c2a4cf1355044fbcebdad4346a4871a89b (diff)
parent4835c615d5a00f146bcd5c7a50153418ce2a3613 (diff)
Merge
Diffstat (limited to 'indra/newview/llworldview.cpp')
-rw-r--r--indra/newview/llworldview.cpp22
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());
+}
+