Commit af3fc38c authored by Michael Carpenter's avatar Michael Carpenter

Fix for HIL dock widget

parent f5d89a62
...@@ -883,18 +883,23 @@ void MainWindow::showHILConfigurationWidget(UASInterface* uas) ...@@ -883,18 +883,23 @@ void MainWindow::showHILConfigurationWidget(UASInterface* uas)
if (mav && !hilDocks.contains(mav->getUASID())) if (mav && !hilDocks.contains(mav->getUASID()))
{ {
//QGCToolWidget* tool = new QGCToolWidget("Unnamed Tool " + QString::number(ui.menuTools->actions().size()));
//createDockWidget(centerStack->currentWidget(),tool,"Unnamed Tool " + QString::number(ui.menuTools->actions().size()),"UNNAMED_TOOL_" + QString::number(ui.menuTools->actions().size())+"DOCK",currentView,Qt::BottomDockWidgetArea);
QGCHilConfiguration* hconf = new QGCHilConfiguration(mav, this); QGCHilConfiguration* hconf = new QGCHilConfiguration(mav, this);
QString hilDockName = tr("HIL Config (%1)").arg(uas->getUASName()); QString hilDockName = tr("HIL Config (%1)").arg(uas->getUASName());
QDockWidget* hilDock = new QDockWidget(hilDockName, this); createDockWidget(centerStack->currentWidget(),hconf,hilDockName,QString("HIL_CONFIG_%1").arg(uas->getUASID()),currentView,Qt::LeftDockWidgetArea);
hilDock->setWidget(hconf); //QDockWidget* hilDock = new QDockWidget(hilDockName, this);
hilDock->setObjectName(QString("HIL_CONFIG_%1").arg(uas->getUASID())); //hilDock->setWidget(hconf);
//hilDock->setObjectName(QString("HIL_CONFIG_%1").arg(uas->getUASID()));
//addTool(hilDock, hilDockName, Qt::LeftDockWidgetArea); //addTool(hilDock, hilDockName, Qt::LeftDockWidgetArea);
hilDocks.insert(mav->getUASID(), hilDock); //hilDocks.insert(mav->getUASID(), hilDock);
if (currentView != VIEW_SIMULATION) //if (currentView != VIEW_SIMULATION)
hilDock->hide(); // hilDock->hide();
else //else
hilDock->show(); // hilDock->show();
} }
} }
......
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