Index: trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/videodisplay.cpp
===================================================================
--- trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/videodisplay.cpp	(revision 4172)
+++ trunk/MagicSoft/AMC/activemirrorcontrol/activemirrorcontrol/videodisplay.cpp	(revision 4173)
@@ -19,4 +19,5 @@
 #include "amclog.h"
 #include "amcmotor.h"
+#include "amcdefs.h"
 #include "amcmirrorpanel.h"
 #include "amcprogdlg.h"
@@ -271,5 +272,5 @@
 	Y_Dec_10_Button->setEnabled( p_zEnable );
 	Y_Dec_100_Button->setEnabled( p_zEnable );
-		
+
 	if( p_zEnable )
 	{
@@ -337,4 +338,9 @@
 	if( ( iRefX == -1 ) && ( iRefY == -1 ) )
 		return;
+	int iDx, iDy;
+	iDx = m_videoFrame->m_iCenterX - CAMERA_X;
+	iDy = m_videoFrame->m_iCenterY - CAMERA_Y;
+	iRefX += iDx;
+	iRefY += iDy;
 	int iStepX, iStepY;
 	calcSteps( iRefX, iRefY, iStepX, iStepY );
@@ -359,6 +365,6 @@
 	if( ( iVSpotX == -1 ) && ( iVSpotY == -1 ) )
 		return;
-	qDebug("Spot at x,y: %4d %4d", iVSpotX, iVSpotY );	
-	qDebug("Ref  at x,y: %4d %4d", p_iRefX, p_iRefY );	
+	qDebug("Spot at x,y: %4d %4d", iVSpotX, iVSpotY );
+	qDebug("Ref  at x,y: %4d %4d", p_iRefX, p_iRefY );
 
 	double dX = p_iRefX - iVSpotX;
