fix: 修复限制区设计的bug。 #25

Merged
WuChengbo merged 1 commits from dev/cbwu into master 1 year ago

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

Loading…
Cancel
Save