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) ...@@ -171,9 +171,7 @@ MainWindow::MainWindow(QSplashScreen* splashScreen)
QDockWidget* widget = new QDockWidget(this); QDockWidget* widget = new QDockWidget(this);
widget->setObjectName("ToolBarDockWidget"); widget->setObjectName("ToolBarDockWidget");
qmlRegisterType<MainToolBar>("QGroundControl.MainToolBar", 1, 0, "MainToolBar"); qmlRegisterType<MainToolBar>("QGroundControl.MainToolBar", 1, 0, "MainToolBar");
_mainToolBar = new MainToolBar(); _mainToolBar = new MainToolBar(widget);
_mainToolBar->setParent(widget);
_mainToolBar->setVisible(true);
widget->setWidget(_mainToolBar); widget->setWidget(_mainToolBar);
widget->setFeatures(QDockWidget::NoDockWidgetFeatures); widget->setFeatures(QDockWidget::NoDockWidgetFeatures);
widget->setTitleBarWidget(new QWidget(this)); // Disables the title bar 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