* @brief Creates a new user-defined workspace and switches to it. */
| 1610 | * @brief Creates a new user-defined workspace and switches to it. |
| 1611 | */ |
| 1612 | void UI::Taskbar::createWorkspace(const QString& name) |
| 1613 | { |
| 1614 | auto* pm = &DataModel::ProjectModel::instance(); |
| 1615 | pm->addWorkspace(name); |
| 1616 | |
| 1617 | const auto& workspaces = pm->activeWorkspaces(); |
| 1618 | if (!workspaces.empty()) |
| 1619 | setActiveGroupId(workspaces.back().workspaceId); |
| 1620 | |
| 1621 | Q_EMIT workspaceModelChanged(); |
| 1622 | } |
| 1623 | |
| 1624 | /** |
| 1625 | * @brief Deletes or hides a workspace. |
nothing calls this directly
no test coverage detected