Commit 0377af7c authored by Don Gagne's avatar Don Gagne

Generic mav ui incorrectly hidden

parent d812056a
......@@ -37,7 +37,6 @@ This file is part of the QGROUNDCONTROL project
#include <QDebug>
#include <QSettings>
#include "MainWindow.h"
ParameterInterface::ParameterInterface(QWidget *parent) :
QWidget(parent),
......@@ -48,13 +47,6 @@ ParameterInterface::ParameterInterface(QWidget *parent) :
m_ui->setupUi(this);
QSettings settings;
enum MainWindow::CUSTOM_MODE mode = static_cast<enum MainWindow::CUSTOM_MODE>(settings.value("QGC_CUSTOM_MODE", MainWindow::CUSTOM_MODE_NONE).toInt());
if (mode == MainWindow::CUSTOM_MODE_PX4)
{
delete m_ui->sensorSettings;
m_ui->sensorSettings = NULL;
}
// Get current MAV list
QList<UASInterface*> systems = UASManager::instance()->getUASList();
......@@ -79,8 +71,7 @@ ParameterInterface::~ParameterInterface()
void ParameterInterface::selectUAS(int index)
{
m_ui->stackedWidget->setCurrentIndex(index);
if (m_ui->sensorSettings)
m_ui->sensorSettings->setCurrentIndex(index);
m_ui->sensorSettings->setCurrentIndex(index);
curr = index;
}
......@@ -109,11 +100,8 @@ void ParameterInterface::addUAS(UASInterface* uas)
QGCSensorSettingsWidget* sensor = NULL;
if (m_ui->sensorSettings)
{
sensor = new QGCSensorSettingsWidget(uas, this);
m_ui->sensorSettings->addWidget(sensor);
}
// Set widgets as default
if (curr == -1) {
......
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