From 2ab48dc3cab33db42fc9b61cff3f3184a6266ee1 Mon Sep 17 00:00:00 2001 From: cbwu <504-wuchengbo@htsdfp.com> Date: Thu, 21 Dec 2023 16:47:16 +0800 Subject: [PATCH] =?UTF-8?q?type(fix):=E4=BF=AE=E5=A4=8D=E8=88=AA=E7=BA=BF?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=97=B6=E4=B8=8D=E5=90=8C=E5=9E=8B=E5=8F=B7?= =?UTF-8?q?=E7=9A=84=E8=88=AA=E7=BA=BF=E5=AF=B9=E5=BA=94=E5=85=B3=E7=B3=BB?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GISDlg.cpp | 110 +++++++++++++++++++++++++++++++---------------------- resource.h | 4 +- 2 files changed, 67 insertions(+), 47 deletions(-) diff --git a/GISDlg.cpp b/GISDlg.cpp index 5e96f4a..743f1ad 100644 --- a/GISDlg.cpp +++ b/GISDlg.cpp @@ -1981,17 +1981,22 @@ void CGISDlg::MouseDownMap1(short Button, short Shift, long x, long y) m_lineSelectedID = IsSelectLine(pt); ClearHighLightLine(); - if (m_lineSelectedID==11) //暂时屏蔽回收航线 + if (g_b981APad || g_b981ADesktop) { - return; + if (m_lineSelectedID==14) //暂时屏蔽回收航线 + { + m_lineSelectedID = -1; + return; + } } + if (m_lineSelectedID>0) { m_editLineDataGroup = m_ShowedLineDataList[m_lineSelectedID]; DrawHighLightLine(m_editLineDataGroup.linePts,m_editLineDataGroup.linePointNum); } } - //回收航线编辑 + //航线编辑 if (m_bEditLine && (Button == 1)) { if (m_lineSelectedID<=0) @@ -2012,9 +2017,12 @@ void CGISDlg::MouseDownMap1(short Button, short Shift, long x, long y) { return; } - if (m_lineSelectedID==11) + if (g_b981CDesktop) { - if (addPointPos>m_editLineDataGroup.linePointNum-4) return; //回收航线屏蔽4,5,6长边不让编辑 + if (m_lineSelectedID==11) + { + if (addPointPos>m_editLineDataGroup.linePointNum-4) return; //回收航线屏蔽4,5,6长边不让编辑 + } } if (m_editLineDataGroup.pointNum>=127) //限制最多127个点 @@ -2022,7 +2030,6 @@ void CGISDlg::MouseDownMap1(short Button, short Shift, long x, long y) return; } - //计算添加点坐标 double linePt1[2] = {m_editLineDataGroup.linePts[addPointPos-1].dX,m_editLineDataGroup.linePts[addPointPos-1].dY}; double linePt2[2] = {m_editLineDataGroup.linePts[addPointPos].dX,m_editLineDataGroup.linePts[addPointPos].dY}; @@ -2053,11 +2060,14 @@ void CGISDlg::MouseDownMap1(short Button, short Shift, long x, long y) int selectedPointID = GetPtSel(m_editLineDataGroup.pts,m_editLineDataGroup.pointNum,x,y); if (selectedPointID>=0) { - if (m_lineSelectedID==11) + if (g_b981CDesktop) { - if (selectedPointID>=m_editLineDataGroup.pointNum-3 || selectedPointID==0) //回收航线屏蔽1,4,5,6,航点 + if (m_lineSelectedID==11) { - return; + if (selectedPointID>=m_editLineDataGroup.pointNum-3 || selectedPointID==0) //回收航线屏蔽1,4,5,6,航点 + { + return; + } } } @@ -2560,13 +2570,17 @@ void CGISDlg::MouseDblClickMap1() if (m_bEditLine) { int ptSelected = GetPtSel(m_editLineDataGroup.pts,m_editLineDataGroup.pointNum,GLOBAL_X,GLOBAL_Y); - if (m_editLineDataGroup.lineID==11) //回收航线屏蔽1,4,5,6航点 + if (g_b981CDesktop) { - if (ptSelected==0 || (ptSelected>=m_editLineDataGroup.pointNum-3)) + if (m_editLineDataGroup.lineID==11) //回收航线屏蔽1,4,5,6航点 { - return; + if (ptSelected==0 || (ptSelected>=m_editLineDataGroup.pointNum-3)) + { + return; + } } } + if (ptSelected>=0) { if (m_distLabelLayer!=-1) @@ -2627,11 +2641,14 @@ void CGISDlg::MouseMoveMap1(short Button, short Shift, long x, long y) { return; } - if (m_editLineDataGroup.lineID==11) //回收航线1,4,5,6不让编辑 + if (g_b981CDesktop) { - if (m_iPtSel==0 || (m_iPtSel>=m_editLineDataGroup.pointNum-3)) + if (m_editLineDataGroup.lineID==11) //回收航线1,4,5,6不让编辑 { - return; + if (m_iPtSel==0 || (m_iPtSel>=m_editLineDataGroup.pointNum-3)) + { + return; + } } } @@ -7430,35 +7447,38 @@ void CGISDlg::ShowEditSaveDlg() // CString dirName = ""; - switch (m_lineSelectedID) + if (g_b981APad ||g_b981ADesktop) { - case 1: - dirName = "航线1\\"; - break; - case 2: - dirName = "航线2\\"; - break; - case 3: - dirName = "航线3\\"; - break; - case 4: - dirName = "地面滑行航线\\"; - break; - case 5: - dirName = "围栏航线\\"; - break; - case 6: - dirName = "空投航线\\"; - break; - case 10: - dirName = "跑道航线\\"; - break; - case 11: - dirName = "回收航线\\"; - break; - case 13: - dirName = "通场航线\\"; - break; + switch (m_lineSelectedID) + { + case 1: + dirName = "航线1\\"; + break; + case 2: + dirName = "航线2\\"; + break; + case 3: + dirName = "航线3\\"; + break; + case 4: + dirName = "航线4\\"; + break; + case 5: + dirName = "航线5\\"; + break; + case 11: + dirName = "应急航线\\"; + break; + case 12: + dirName = "电子围栏航线\\"; + break; + case 13: + dirName = "原路返航航线\\"; + break; + case 14: + dirName = "回收航线\\"; + break; + } } //重新保存回收航线 @@ -7500,7 +7520,7 @@ void CGISDlg::ShowEditSaveDlg() } else if (i==n_linePts-1) { - if (m_lineSelectedID==11) //回收航线 + if (m_lineSelectedID==11 && g_b981CDesktop) //回收航线 { fprintf(fp,"%d, %d, %lf, %lf, %.2lf, 0, 00, 07\n", m_editLineDataGroup.lineID,i,linePt.dX,linePt.dY,linePt.nH); } @@ -7512,7 +7532,7 @@ void CGISDlg::ShowEditSaveDlg() } else if (i==n_linePts) { - if (m_lineSelectedID==11) //回收航线 + if (m_lineSelectedID==11 && g_b981CDesktop) //回收航线 { fprintf(fp,"%d, %d, %lf, %lf, %.2lf, 0, 00, 0B\n", m_editLineDataGroup.lineID,i,linePt.dX,linePt.dY,linePt.nH); } diff --git a/resource.h b/resource.h index 2640f0a..7c7cc89 100644 --- a/resource.h +++ b/resource.h @@ -289,7 +289,6 @@ #define ID_32819 32819 #define IDM_BINDLINE3 32820 #define ID_32821 32821 -#define IDM_BINDLINE4 32822 #define IDM_BINDLINE5 32823 #define ID_32825 32825 #define IDM_LAYERMNG 32828 @@ -370,13 +369,14 @@ #define IDM_SHOW_LINE14 32908 #define ID_SHOW_BACKLINE 32909 #define ID_BIND_BACKLINE 32910 +#define IDM_BINDLINE4 32911 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 1169 -#define _APS_NEXT_COMMAND_VALUE 32911 +#define _APS_NEXT_COMMAND_VALUE 32912 #define _APS_NEXT_CONTROL_VALUE 1050 #define _APS_NEXT_SYMED_VALUE 1000 #endif