Commit f973ecc3 authored by lm's avatar lm

Fixed bug in RC view

parent e2982eb0
......@@ -79,20 +79,7 @@ void QGCRemoteControlView::setUASId(int id)
{
// Clear channel count
raw.clear();
raw.resize(0);
normalized.clear();
normalized.resize(0);
foreach (QLabel* label, rawLabels)
{
label->deleteLater();
}
foreach(QProgressBar* bar, progressBars)
{
bar->deleteLater();
}
if (uasId != -1) {
UASInterface* uas = UASManager::instance()->getUASForId(id);
......@@ -105,6 +92,19 @@ void QGCRemoteControlView::setUASId(int id)
}
}
foreach (QLabel* label, rawLabels)
{
label->deleteLater();
}
foreach(QProgressBar* bar, progressBars)
{
bar->deleteLater();
}
rawLabels.clear();
progressBars.clear();
// Connect the new UAS
UASInterface* newUAS = UASManager::instance()->getUASForId(id);
if (newUAS) {
......
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