diff --git a/src/core/MainWindow.cpp b/src/core/MainWindow.cpp
index 908ed196..e7f4ad33 100644
--- a/src/core/MainWindow.cpp
+++ b/src/core/MainWindow.cpp
@@ -163,10 +163,6 @@ void MainWindow::initUI()
plugin->setupInterface(this);
}
-#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
- setDockOptions(dockOptions() | DockOption::GroupedDragging);
-#endif
-
initLayout();
}
@@ -625,6 +621,10 @@ void MainWindow::readSettingsOrDefault()
setPanelLock();
tabsOnTop = settings.value("tabsOnTop").toBool();
setTabLocation();
+ bool dockGroupedDragging = settings.value("docksGroupedDragging", false).toBool();
+ ui->actionGrouped_dock_dragging->setChecked(dockGroupedDragging);
+ on_actionGrouped_dock_dragging_triggered(dockGroupedDragging);
+
QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint();
QSize size = settings.value("size", QSize(400, 400)).toSize();
resize(size);
@@ -641,6 +641,7 @@ void MainWindow::saveSettings()
settings.setValue("state", saveState());
settings.setValue("panelLock", panelLock);
settings.setValue("tabsOnTop", tabsOnTop);
+ settings.setValue("docksGroupedDragging", ui->actionGrouped_dock_dragging->isChecked());
}
void MainWindow::readDebugSettings()
@@ -1130,6 +1131,13 @@ void MainWindow::on_actionExport_as_code_triggered()
fileOut << Core()->cmd(cmd + " $s @ 0");
}
+void MainWindow::on_actionGrouped_dock_dragging_triggered(bool checked)
+{
+ auto options = dockOptions();
+ options.setFlag(QMainWindow::DockOption::GroupedDragging, checked);
+ setDockOptions(options);
+}
+
void MainWindow::projectSaved(bool successfully, const QString &name)
{
diff --git a/src/core/MainWindow.h b/src/core/MainWindow.h
index a201e453..5d50433d 100644
--- a/src/core/MainWindow.h
+++ b/src/core/MainWindow.h
@@ -177,6 +177,8 @@ private slots:
void on_actionExport_as_code_triggered();
+ void on_actionGrouped_dock_dragging_triggered(bool checked);
+
void projectSaved(bool successfully, const QString &name);
void updateTasksIndicator();
diff --git a/src/core/MainWindow.ui b/src/core/MainWindow.ui
index e143f6de..767787c6 100644
--- a/src/core/MainWindow.ui
+++ b/src/core/MainWindow.ui
@@ -89,6 +89,7 @@
+