Commit 0309e098 authored by Don Gagne's avatar Don Gagne

Merge pull request #929 from DonLakeFlyer/ParameterInterface

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