|
@@ -1877,8 +1877,13 @@ namespace OTSMeasureApp
|
|
|
{
|
|
|
if (curMeasureGdi.GetGPath().IsVisible(e.Location))
|
|
|
{
|
|
|
-
|
|
|
- curMeasureGdi.PositionAltering(e.Location,true);
|
|
|
+ if (m_visualStage.GetEdgeGDIObj().GetGPath().IsVisible(e.Location))
|
|
|
+ {
|
|
|
+
|
|
|
+ curMeasureGdi.PositionAltering(e.Location, true);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1914,11 +1919,7 @@ namespace OTSMeasureApp
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
- var selWSampleMeasureStatus = m_MeasureAppForm.m_ProjParam.GetWorkSampleMeasureStatus();
|
|
|
- if (selWSampleMeasureStatus)
|
|
|
- {
|
|
|
- return;
|
|
|
- }
|
|
|
+
|
|
|
var sam = GetWorkingVisualSample();
|
|
|
|
|
|
//判断当前是否手绘
|
|
@@ -1968,17 +1969,20 @@ namespace OTSMeasureApp
|
|
|
var measureItem = sam.GetMeasureGDIObject();
|
|
|
if (measureItem.IsDragging || measureItem.IsAltering)//while pressing ctrl key then it must be altering something(position or size)
|
|
|
{
|
|
|
-
|
|
|
- var para = m_visualStage.GetSampleMeasurePara(measureItem);
|
|
|
- m_MeasureAppForm.m_ProjParam.SetWorkSampleHoleAndMeasureArea(para);//set the altering result to the public parameter object
|
|
|
+ var selWSampleMeasureStatus = m_MeasureAppForm.m_ProjParam.GetWorkSampleMeasureStatus();
|
|
|
+ if (!selWSampleMeasureStatus)
|
|
|
+ {
|
|
|
+
|
|
|
+ var para = m_visualStage.GetSampleMeasurePara(measureItem);
|
|
|
+ m_MeasureAppForm.m_ProjParam.SetWorkSampleHoleAndMeasureArea(para);//set the altering result to the public parameter object
|
|
|
|
|
|
|
|
|
- this.Cursor = System.Windows.Forms.Cursors.Default;
|
|
|
+ this.Cursor = System.Windows.Forms.Cursors.Default;
|
|
|
|
|
|
- m_MeasureAppForm.m_RunType = MSR_THREAD_RunSTATUS.RUNMEASURE;
|
|
|
- CMeasureThreadWrapper.DoRunType = MSR_THREAD_RunSTATUS.RUNMEASURE;
|
|
|
-
|
|
|
- PrepareMeasureField(sam);
|
|
|
+ PrepareMeasureField(sam);
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
measureItem.IsAltering = false;
|
|
|
measureItem.IsDragging = false;
|
|
@@ -2145,7 +2149,7 @@ namespace OTSMeasureApp
|
|
|
|
|
|
foreach (CRectangleGDIObject item in objList)
|
|
|
{
|
|
|
- item.IsDragging = true;
|
|
|
+ item.IsMoving = true;
|
|
|
item.DraggingPoint = e.Location;
|
|
|
}
|
|
|
}
|
|
@@ -2153,7 +2157,7 @@ namespace OTSMeasureApp
|
|
|
{
|
|
|
foreach (CRectangleGDIObject item in objList)
|
|
|
{
|
|
|
- if (item.IsDragging)
|
|
|
+ if (item.IsMoving)
|
|
|
{
|
|
|
|
|
|
item.Move(e.Location);
|
|
@@ -2174,6 +2178,13 @@ namespace OTSMeasureApp
|
|
|
item.DraggingPoint = Point.Empty;
|
|
|
|
|
|
}
|
|
|
+ if (item.IsMoving)
|
|
|
+ {
|
|
|
+
|
|
|
+ item.IsMoving = false;
|
|
|
+ item.DraggingPoint = Point.Empty;
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|