summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleo2004-01-07 20:34:56 +0000
committerleo2004-01-07 20:34:56 +0000
commit39d9d3efc3f747b6f890c02a77b3e5be96557527 (patch)
tree5cf8425301e55c88246394bf05cff4617782b9f0
parent03b13d3b1a24bc56b26e750720513e2691e6ed29 (diff)
Correctly update the dialog when a camera target is selected.
git-svn-id: http://svn.leocad.org/trunk@353 c7d43263-9d01-0410-8a33-9dba5d9f93d6
-rw-r--r--win/Moddlg.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/win/Moddlg.cpp b/win/Moddlg.cpp
index f2721a3..e185282 100644
--- a/win/Moddlg.cpp
+++ b/win/Moddlg.cpp
@@ -200,7 +200,12 @@ void CModifyDialog::UpdateInfo(Object* pObject)
case LC_OBJECT_CAMERA_TARGET:
{
float tmp[3];
- Camera* pCamera = (Camera*)m_pObject;
+ Camera* pCamera;
+ if (m_nType == LC_OBJECT_CAMERA)
+ pCamera = (Camera*)m_pObject;
+ else
+ pCamera = ((CameraTarget*)m_pObject)->GetParent();
+
pCamera->GetEyePos(tmp);
m_fPosX = tmp[0];
m_fPosY = tmp[1];