diff --git a/src/core/MainWindow.cpp b/src/core/MainWindow.cpp index 99d19aa4..265c0653 100644 --- a/src/core/MainWindow.cpp +++ b/src/core/MainWindow.cpp @@ -124,7 +124,6 @@ void MainWindow::initUI() initToolBar(); initDocks(); - initLayout(); /* * Some global shortcuts @@ -165,6 +164,8 @@ void MainWindow::initUI() #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) setDockOptions(dockOptions() | DockOption::GroupedDragging); #endif + + initLayout(); } void MainWindow::initToolBar() @@ -455,7 +456,7 @@ void MainWindow::addPluginDockWidget(QDockWidget *dockWidget, QAction *action) addDockWidget(Qt::TopDockWidgetArea, dockWidget); addDockWidgetAction(dockWidget, action); ui->menuPlugins->addAction(action); - tabifyDockWidget(dashboardDock, dockWidget); + addDockWidget(Qt::DockWidgetArea::TopDockWidgetArea, dockWidget); updateDockActionChecked(action); } @@ -646,6 +647,16 @@ void MainWindow::readSettingsOrDefault() hideAllDocks(); restoreGeometry(geo); restoreState(state); + + // make sure all DockWidgets are part of the MainWindow + // also show them, so newly installed plugin widgets are shown right away + for (auto dockWidget : dockWidgets) { + if (dockWidgetArea(dockWidget) == Qt::DockWidgetArea::NoDockWidgetArea) { + addDockWidget(Qt::DockWidgetArea::TopDockWidgetArea, dockWidget); + dockWidget->show(); + } + } + responsive = settings.value("responsive").toBool(); panelLock = settings.value("panelLock").toBool(); setPanelLock();