viewer#1672 Crash at setDefaultFOV
Some things can make a copy of camera, like LLViewerWindow::cubeSnapshot so need to store and clean up the connectionmaster
parent
14c89a62c0
commit
57ade10b70
|
|
@ -94,7 +94,13 @@ LLViewerCamera::LLViewerCamera() : LLCamera()
|
|||
mZoomSubregion = 1;
|
||||
mAverageSpeed = 0.f;
|
||||
mAverageAngularSpeed = 0.f;
|
||||
gSavedSettings.getControl("CameraAngle")->getCommitSignal()->connect(boost::bind(&LLViewerCamera::updateCameraAngle, this, _2));
|
||||
|
||||
mCameraAngleChangedSignal = gSavedSettings.getControl("CameraAngle")->getCommitSignal()->connect(boost::bind(&LLViewerCamera::updateCameraAngle, this, _2));
|
||||
}
|
||||
|
||||
LLViewerCamera::~LLViewerCamera()
|
||||
{
|
||||
mCameraAngleChangedSignal.disconnect();
|
||||
}
|
||||
|
||||
void LLViewerCamera::updateCameraLocation(const LLVector3 ¢er, const LLVector3 &up_direction, const LLVector3 &point_of_interest)
|
||||
|
|
@ -895,10 +901,8 @@ bool LLViewerCamera::isDefaultFOVChanged()
|
|||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
void LLViewerCamera::updateCameraAngle( void* user_data, const LLSD& value)
|
||||
void LLViewerCamera::updateCameraAngle(const LLSD& value)
|
||||
{
|
||||
LLViewerCamera* self=(LLViewerCamera*)user_data;
|
||||
self->setDefaultFOV(value.asReal());
|
||||
setDefaultFOV(value.asReal());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ class alignas(16) LLViewerCamera : public LLCamera, public LLSimpleton<LLViewerC
|
|||
LL_ALIGN_NEW
|
||||
public:
|
||||
LLViewerCamera();
|
||||
~LLViewerCamera();
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -65,7 +66,7 @@ public:
|
|||
const LLVector3 &point_of_interest);
|
||||
|
||||
static void updateFrustumPlanes(LLCamera& camera, bool ortho = false, bool zflip = false, bool no_hacks = false);
|
||||
static void updateCameraAngle(void* user_data, const LLSD& value);
|
||||
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;
|
||||
|
|
@ -125,6 +126,8 @@ protected:
|
|||
F32 mZoomFactor;
|
||||
S16 mZoomSubregion;
|
||||
|
||||
boost::signals2::connection mCameraAngleChangedSignal;
|
||||
|
||||
public:
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue