Merge pull request 'fix: 修复限制区设计的bug。' (#25) from dev/cbwu into master

Reviewed-on: #25
master
WuChengbo 1 year ago
commit b22f50f1d8

@ -2685,7 +2685,7 @@ void CGISDlg::MouseMoveMap1(short Button, short Shift, long x, long y)
double yPoints[5];
double endPoint[2] = {dX,dY};
ComputeRectanglePoints(firstZonePoint,endPoint,xPoints,yPoints);
DrawRestrictedZone(noFlyZoneLayersID[0],xPoints,yPoints,5,1);
DrawRestrictedZone(m_tempZoneLayerID,xPoints,yPoints,5,1);
m_map.Redraw();
}
@ -4933,7 +4933,7 @@ void CGISDlg::OnShowGivenLine(const CString strLineFileName)
}
int ch = lineDataGroup.linePts[lineDataGroup.pointNum-1].ch1;
if (ch==0x0C) //限飞区
if (ch==0x0D) //限飞区
{
//ClearZoneLayer(restrictedZoneLayersID[lineDataGroup.lineID-1]);
double xPoints[5];
@ -4946,7 +4946,7 @@ void CGISDlg::OnShowGivenLine(const CString strLineFileName)
DrawRestrictedZone(restrictedZoneLayersID[lineDataGroup.lineID-1],xPoints,yPoints,5,0);
return;
}
else if(ch == 0x0D) //禁飞区
else if(ch == 0x0C) //禁飞区
{
double xPoints[5];
double yPoints[5];
@ -7732,11 +7732,15 @@ void CGISDlg::ShowSaveZoneDlg(double* xPoints,double* yPoints)
fclose(fp);
}
if (m_tempZoneLayerID>=0)
{
m_map.RemoveLayer(m_tempZoneLayerID);
m_tempZoneLayerID = -1;
}
//ÏÔÊ¾ÇøÓò
OnShowGivenLine(filename);
}
m_map.RemoveLayer(m_tempZoneLayerID);
m_map.Redraw();
}
}

Loading…
Cancel
Save