summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatercamera.cpp
diff options
context:
space:
mode:
authorJonathan Yap <jhwelch@gmail.com>2017-02-23 17:50:36 -0500
committerJonathan Yap <jhwelch@gmail.com>2017-02-23 17:50:36 -0500
commit5c4ae5b11a44ab4711f0148cb721f35be9f18100 (patch)
tree63547de0e485eda85168600962798467062731d3 /indra/newview/llfloatercamera.cpp
parent68413474c4479eee9bdbeb34ea131475ba1d646e (diff)
STORM-2145 Camera Presets -- some initial work
Diffstat (limited to 'indra/newview/llfloatercamera.cpp')
-rw-r--r--indra/newview/llfloatercamera.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 20d650fa37..777963bec5 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -42,6 +42,7 @@
#include "llslider.h"
#include "llfirstuse.h"
#include "llhints.h"
+#include "lltabcontainer.h"
static LLDefaultChildRegistry::Register<LLPanelCameraItem> r("panel_camera_item");
@@ -353,6 +354,7 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val)
{
LLHints::registerHintTarget("view_popup", getHandle());
mCommitCallbackRegistrar.add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraItem, _2));
+ mCommitCallbackRegistrar.add("Presets.GoViewPrefs", boost::bind(&LLFloaterCamera::onViewButtonClick, this, _2));
}
// virtual
@@ -376,6 +378,24 @@ BOOL LLFloaterCamera::postBuild()
return LLFloater::postBuild();
}
+void LLFloaterCamera::onViewButtonClick(const LLSD& user_data)
+{
+ // bring up the prefs floater
+ LLFloater* prefsfloater = LLFloaterReg::showInstance("preferences");
+ if (prefsfloater)
+ {
+ // grab the 'view' panel from the preferences floater and
+ // bring it the front!
+ LLTabContainer* tabcontainer = prefsfloater->getChild<LLTabContainer>("pref core");
+ LLPanel* graphicspanel = prefsfloater->getChild<LLPanel>("move");
+ if (tabcontainer && graphicspanel)
+ {
+ tabcontainer->selectTabPanel(graphicspanel);
+ }
+ }
+}
+
+
void LLFloaterCamera::fillFlatlistFromPanel (LLFlatListView* list, LLPanel* panel)
{
// copying child list and then iterating over a copy, because list itself