Commit e10ca000 authored by lm's avatar lm

Re-enabled custom widget loading

parent 6bbd1bb1
......@@ -1766,10 +1766,13 @@ void UAS::setSystemType(int systemType)
void UAS::setUASName(const QString& name)
{
if (name != "")
{
this->name = name;
writeSettings();
emit nameChanged(name);
emit systemSpecsChanged(uasId);
}
}
void UAS::executeCommand(MAV_CMD command)
......
......@@ -146,6 +146,8 @@ MainWindow::MainWindow(QWidget *parent):
// Create actions
connectCommonActions();
buildCustomWidget();
// Restore the window setup
......@@ -268,9 +270,6 @@ QString MainWindow::getWindowGeometryKey()
void MainWindow::buildCustomWidget()
{
// Show custom widgets only if UAS is connected
if (UASManager::instance()->getActiveUAS() != NULL)
{
// Create custom widgets
QList<QGCToolWidget*> widgets = QGCToolWidget::createWidgetsFromSettings(this);
......@@ -303,7 +302,6 @@ void MainWindow::buildCustomWidget()
addDockWidget(location, dock);
}
}
}
}
void MainWindow::buildCommonWidgets()
......@@ -1251,11 +1249,11 @@ void MainWindow::UASCreated(UASInterface* uas)
if (!ui.menuConnected_Systems->isEnabled()) ui.menuConnected_Systems->setEnabled(true);
// Restore the mainwindow size
if (settings.contains(getWindowGeometryKey()))
{
restoreGeometry(settings.value(getWindowGeometryKey()).toByteArray());
}
// // Restore the mainwindow size
// if (settings.contains(getWindowGeometryKey()))
// {
// restoreGeometry(settings.value(getWindowGeometryKey()).toByteArray());
// }
}
/**
......
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