Commit 05bd9273 authored by Don Gagne's avatar Don Gagne

Don't force visibility of toolbar

Although this should theoretically be a no-op it causes a crash in
Windows when running unit tests. Also parent toolbar in constructor.
parent 8ee51d34
......@@ -171,9 +171,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen)
QDockWidget* widget = new QDockWidget(this);
widget->setObjectName("ToolBarDockWidget");
qmlRegisterType<MainToolBar>("QGroundControl.MainToolBar", 1, 0, "MainToolBar");
_mainToolBar = new MainToolBar();
_mainToolBar->setParent(widget);
_mainToolBar->setVisible(true);
_mainToolBar = new MainToolBar(widget);
widget->setWidget(_mainToolBar);
widget->setFeatures(QDockWidget::NoDockWidgetFeatures);
widget->setTitleBarWidget(new QWidget(this)); // Disables the title bar
......
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