diff --git a/src/ui/HDDisplay.cc b/src/ui/HDDisplay.cc index cfeaae750851dacc2776134cc0df9464d7fc1e60..f83027efaddd6b5b50757d1ba86d6e4ea4f0363f 100644 --- a/src/ui/HDDisplay.cc +++ b/src/ui/HDDisplay.cc @@ -128,8 +128,8 @@ HDDisplay::HDDisplay(QStringList* plotList, QString title, QWidget *parent) : if (font.family() != fontFamilyName) qDebug() << "ERROR! Font not loaded: " << fontFamilyName; // Connect with UAS - connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)), this, SLOT(setActiveUAS(UASInterface*))); - //start(); + connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)), this, SLOT(setActiveUAS(UASInterface*)), Qt::UniqueConnection); + setActiveUAS(UASManager::instance()->getActiveUAS()); } HDDisplay::~HDDisplay() @@ -476,6 +476,8 @@ void HDDisplay::renderOverlay() */ void HDDisplay::setActiveUAS(UASInterface* uas) { + if (!uas) + return; // Disconnect any previously connected active UAS if (this->uas != NULL) { removeSource(this->uas);