Commit 1858a52c authored by Bryant's avatar Bryant

The QuickView now properly resets after the last UAS is deleted.

parent fc73187a
......@@ -153,11 +153,20 @@ void UASQuickView::setActiveUAS(UASInterface* uas)
{
uasPropertyList.clear();
uasPropertyValueMap.clear();
foreach (UASQuickViewItem* i, uasPropertyToLabelMap.values())
{
i->deleteLater();
}
uasPropertyToLabelMap.clear();
updateTimer->stop();
this->actions().clear();
foreach (QAction* i, this->actions())
{
i->deleteLater();
}
}
// Update the UAS to point to the new one.
this->uas = uas;
if (this->uas)
......
......@@ -17,6 +17,10 @@ public:
UASQuickView(QWidget *parent = 0);
void addSource(MAVLinkDecoder *decoder);
private:
/**
* Adds a default set of actions to the widget's menu.
*/
void addDefaultActions();
UASInterface *uas;
/** List of enabled properties */
......
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