Browse Source

fix bugs when open exiting measure results.

gsp 3 years ago
parent
commit
4fe512eaeb

+ 1 - 1
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/OTSSamplespaceWindow.cs

@@ -332,7 +332,7 @@ namespace OTSMeasureApp
 
         public void OpenExistSampleFile(CStage SStage, CSEMStageData SEMStageData, List<SampleMeasurePara> SMeasrueParaList)
         {
-        
+            m_visualStage.clear();
             m_visualStage.InitSampleStageData(SStage, SEMStageData, this.Width, this.Height);
             m_visualStage.DrawSampleStage();
             m_visualSamples.Clear();

+ 10 - 1
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/VisualStage.cs

@@ -85,6 +85,15 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
             m_ContentGDIObjects = new List<CRectangleGDIObject>();
 
             m_OTSSampleStageData = new StageDrawingData();
+        }
+        public void clear()
+        {
+            m_StageEdgeGDIObjects.Clear();
+            m_SpecimenGDIObjects.Clear();
+            m_SampleHoleGDIObjects.Clear();
+            m_ContentGDIObjects.Clear();
+
+
         }
         public CRectangleGDIObject GetEdgeGDIObj()
         {
@@ -284,7 +293,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
                         //将微米转换为像素
 
                         float  widthHole = Math.Abs(yHole.X - xHole.X);
-                         float  heightHole = Math.Abs(yHole.Y - xHole.Y);
+                        float  heightHole = Math.Abs(yHole.Y - xHole.Y);
                         var RecF = GetCtrlCoordRectF(xHole, yHole);
                         //获取矩形
                         CRectangleGDIObject CreateHole = null;