Commit d0bca7cb authored by tecnosapiens's avatar tecnosapiens

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

add the functionality to erase the list of Waypoint widget (WaypointView) from the button of the WaypointList widget
parent 91888650
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment