Browse Source

add the functionality to erase the list of Waypoint widget (WaypointView) from the button of the WaypointList widget

QGC4.4
tecnosapiens 15 years ago
parent
commit
d0bca7cb02
  1. 20
      src/ui/WaypointList.cc

20
src/ui/WaypointList.cc

@ -360,18 +360,20 @@ void WaypointList::on_clearWPListButton_clicked() @@ -360,18 +360,20 @@ void WaypointList::on_clearWPListButton_clicked()
{
emit clearPathclicked();
// if (uas)
// {
// const QVector<Waypoint *> &waypoints = uas->getWaypointManager().getWaypointList();
// for(int i = 0; i <=waypoints.size(); i++)
// {
// WaypointView* widget = wpViews.find(waypoints[i]).value();
if (uas)
{
const QVector<Waypoint *> &waypoints = uas->getWaypointManager().getWaypointList();
while(!waypoints.isEmpty())//for(int i = 0; i <= waypoints.size(); i++)
{
//Waypoint *temp = waypoints[i];
// widget->remove();
WaypointView* widget = wpViews.find(waypoints[0]).value();
// }
widget->remove();
// }
}
}
}
/** @brief Add a waypoint by mouse click over the map */

Loading…
Cancel
Save