Pārlūkot izejas kodu

fix bug in COTSField class

GSP 1 nedēļu atpakaļ
vecāks
revīzija
53c59dcc5c

+ 2 - 2
OTSCPP/OTSClrInterface/CommonClr/OTSParticleClr.cpp

@@ -262,8 +262,8 @@ namespace OTSCLRINTERFACE {
 	}
 	void COTSParticleClr::SetFieldOTSPos(System::Drawing::Point^ a_pOTSPos)
 	{
-		int x = a_pOTSPos->X;
-		int y = a_pOTSPos->Y;	
+		auto x = a_pOTSPos->X;
+		auto y = a_pOTSPos->Y;
 		m_Particle->get()->SetOTSScanFieldPos(CPoint(x, y));
 	}
 

+ 2 - 1
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSField.cs

@@ -837,7 +837,8 @@ namespace OTSDataType
                 semPos.X = (int)semP.X;
                 semPos.Y = (int)semP.Y;
                 p.SetSEMPos(semPos);
-                p.SetFieldOTSPos(GetOTSPosition());
+                var otspos = GetOTSPosition();
+                p.SetFieldOTSPos(new Point((int)otspos.X,(int)otspos.Y));
             }
 
         }