From 78cbb8e997b98d6a3485d9ddfd413bbe43c66a2e Mon Sep 17 00:00:00 2001 From: pixhawk Date: Sun, 23 Jan 2011 18:24:00 +0100 Subject: [PATCH] Removed spurious references to global waypoint files --- src/ui/WaypointList.cc | 58 ------------------------------------------ src/ui/WaypointList.h | 2 -- 2 files changed, 60 deletions(-) diff --git a/src/ui/WaypointList.cc b/src/ui/WaypointList.cc index 904ea6980..7c6f523b2 100644 --- a/src/ui/WaypointList.cc +++ b/src/ui/WaypointList.cc @@ -309,63 +309,6 @@ void WaypointList::waypointListChanged() this->setUpdatesEnabled(false); const QVector &waypoints = uas->getWaypointManager()->getWaypointList(); - // For Global Waypoints - //if(isGlobalWP) - //{ - //isLocalWP = false; - //// first remove all views of non existing waypoints - //if (!wpGlobalViews.empty()) - //{ - //QMapIterator viewIt(wpGlobalViews); - //viewIt.toFront(); - //while(viewIt.hasNext()) - //{ - //viewIt.next(); - //Waypoint *cur = viewIt.key(); - //int i; - //for (i = 0; i < waypoints.size(); i++) - //{ - //if (waypoints[i] == cur) - //{ - //break; - //} - //} - //if (i == waypoints.size()) - //{ - //WaypointGlobalView* widget = wpGlobalViews.find(cur).value(); - //widget->hide(); - //listLayout->removeWidget(widget); - //wpGlobalViews.remove(cur); - //} - //} - //} - - //// then add/update the views for each waypoint in the list - //for(int i = 0; i < waypoints.size(); i++) - //{ - //Waypoint *wp = waypoints[i]; - //if (!wpGlobalViews.contains(wp)) - //{ - //WaypointGlobalView* wpview = new WaypointGlobalView(wp, this); - //wpGlobalViews.insert(wp, wpview); - //connect(wpview, SIGNAL(removeWaypoint(Waypoint*)), this, SLOT(removeWaypoint(Waypoint*))); - //connect(wpview, SIGNAL(changePositionWP(Waypoint*)), this, SLOT(changeWPPositionBySpinBox(Waypoint*))); - //// connect(wpview, SIGNAL(moveDownWaypoint(Waypoint*)), this, SLOT(moveDown(Waypoint*))); - //// connect(wpview, SIGNAL(moveUpWaypoint(Waypoint*)), this, SLOT(moveUp(Waypoint*))); - //// connect(wpview, SIGNAL(changePositionWP(Waypoint*)), this, SLOT(waypointGlobalPositionChanged(Waypoint*))); - //// connect(wpview, SIGNAL(currentWaypointChanged(quint16)), this, SLOT(currentWaypointChanged(quint16))); - //// connect(wpview, SIGNAL(changeCurrentWaypoint(quint16)), this, SLOT(changeCurrentWaypoint(quint16))); - //} - //WaypointGlobalView *wpgv = wpGlobalViews.value(wp); - //wpgv->updateValues(); - //listLayout->addWidget(wpgv); - //} - - //} - //else - //{ - // for local Waypoints - // first remove all views of non existing waypoints if (!wpViews.empty()) { QMapIterator viewIt(wpViews); @@ -416,7 +359,6 @@ void WaypointList::waypointListChanged() loadFileGlobalWP = false; - //} } void WaypointList::moveUp(Waypoint* wp) diff --git a/src/ui/WaypointList.h b/src/ui/WaypointList.h index 43bd65055..cb36e8bd5 100644 --- a/src/ui/WaypointList.h +++ b/src/ui/WaypointList.h @@ -41,7 +41,6 @@ This file is part of the QGROUNDCONTROL project #include "Waypoint.h" #include "UASInterface.h" #include "WaypointView.h" -#include "WaypointGlobalView.h" namespace Ui { @@ -115,7 +114,6 @@ protected: protected: QMap wpViews; - //QMap wpGlobalViews; QVBoxLayout* listLayout; UASInterface* uas; double mavX; -- 2.22.0