kb3定
This commit is contained in:
@@ -329,7 +329,7 @@ void OPMapWidget::WPLineDelete(WayPointItem *from, WayPointItem *to)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}while(1);
|
||||
}while(0);
|
||||
}
|
||||
|
||||
WayPointLine *OPMapWidget::WPLineFind(WayPointItem *from, WayPointItem *to)
|
||||
@@ -1212,12 +1212,20 @@ void OPMapWidget::WPLocalChanged(QPointF p, WayPointItem *w)
|
||||
|
||||
void OPMapWidget::WPFollowPrevious(bool flag,WayPointItem *w)
|
||||
{
|
||||
int Point_Count = 0;
|
||||
foreach(QGraphicsItem * i, map->childItems()) {
|
||||
WayPointItem *w = qgraphicsitem_cast<WayPointItem *>(i);
|
||||
if (w) {//逐渐往下增加
|
||||
Point_Count++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(flag)
|
||||
{
|
||||
WayPointItem *item = WPFind(w->Number() - 1);
|
||||
if(item)
|
||||
{
|
||||
|
||||
WPLineDelete(item,w);
|
||||
|
||||
//跟随上一点的位置
|
||||
@@ -1245,7 +1253,7 @@ void OPMapWidget::WPFollowPrevious(bool flag,WayPointItem *w)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}while(1);
|
||||
}while(front_seq > 0);
|
||||
|
||||
WayPointItem *next_item;
|
||||
int next_seq = w->Number();
|
||||
@@ -1269,7 +1277,7 @@ void OPMapWidget::WPFollowPrevious(bool flag,WayPointItem *w)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}while(1);
|
||||
}while(next_seq <= Point_Count);
|
||||
|
||||
if(next_item)
|
||||
{
|
||||
@@ -1310,7 +1318,7 @@ void OPMapWidget::WPFollowPrevious(bool flag,WayPointItem *w)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}while(1);
|
||||
}while(front_seq > 0);
|
||||
|
||||
WayPointItem *next_item;
|
||||
int next_seq = w->Number()+1;
|
||||
@@ -1332,7 +1340,7 @@ void OPMapWidget::WPFollowPrevious(bool flag,WayPointItem *w)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}while(1);
|
||||
}while(next_seq <= Point_Count);
|
||||
|
||||
if((front_item)&&(next_item))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user