diff options
| -rw-r--r-- | indra/newview/llviewercamera.cpp | 19 | ||||
| -rw-r--r-- | indra/newview/llviewercamera.h | 4 | 
2 files changed, 8 insertions, 15 deletions
| diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index 7d777162ed..89c28ee2f9 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -73,12 +73,14 @@ LLViewerCamera::LLViewerCamera() : LLCamera()      mAverageSpeed = 0.f;      mAverageAngularSpeed = 0.f; -    mCameraAngleChangedSignal = gSavedSettings.getControl("CameraAngle")->getCommitSignal()->connect(boost::bind(&LLViewerCamera::updateCameraAngle, this, _2)); -} - -LLViewerCamera::~LLViewerCamera() -{ -    mCameraAngleChangedSignal.disconnect(); +    LLPointer<LLControlVariable> cntrl_ptr = gSavedSettings.getControl("CameraAngle"); +    if (cntrl_ptr.notNull()) +    { +        cntrl_ptr->getCommitSignal()->connect([](LLControlVariable* control, const LLSD& value, const LLSD& previous) +        { +            LLViewerCamera::getInstance()->setDefaultFOV((F32)value.asReal()); +        }); +    }  }  void LLViewerCamera::updateCameraLocation(const LLVector3 ¢er, const LLVector3 &up_direction, const LLVector3 &point_of_interest) @@ -814,8 +816,3 @@ bool LLViewerCamera::isDefaultFOVChanged()      return false;  } -void LLViewerCamera::updateCameraAngle(const LLSD& value) -{ -    setDefaultFOV((F32)value.asReal()); -} - diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h index a204b85d88..91d26f09f2 100644 --- a/indra/newview/llviewercamera.h +++ b/indra/newview/llviewercamera.h @@ -43,7 +43,6 @@ class alignas(16) LLViewerCamera : public LLCamera, public LLSimpleton<LLViewerC      LL_ALIGN_NEW  public:      LLViewerCamera(); -    ~LLViewerCamera();      typedef enum      { @@ -66,7 +65,6 @@ public:                                  const LLVector3 &point_of_interest);      static void updateFrustumPlanes(LLCamera& camera, bool ortho = false, bool zflip = false, bool no_hacks = false); -    void updateCameraAngle(const LLSD& value);      void setPerspective(bool for_selection, S32 x, S32 y_from_bot, S32 width, S32 height, bool limit_select_distance, F32 z_near = 0, F32 z_far = 0);      const LLMatrix4 &getProjection() const; @@ -126,8 +124,6 @@ protected:      F32                 mZoomFactor;      S16                 mZoomSubregion; -    boost::signals2::connection mCameraAngleChangedSignal; -  public:  }; | 
