* @brief Wipes every workspace, leaving an empty customised list. */
| 5104 | * @brief Wipes every workspace, leaving an empty customised list. |
| 5105 | */ |
| 5106 | void DataModel::ProjectModel::clearAllWorkspaces() |
| 5107 | { |
| 5108 | if (AppState::instance().operationMode() != SerialStudio::ProjectFile) |
| 5109 | return; |
| 5110 | |
| 5111 | if (!m_customizeWorkspaces) |
| 5112 | setCustomizeWorkspaces(true); |
| 5113 | |
| 5114 | if (m_workspaces.empty()) |
| 5115 | return; |
| 5116 | |
| 5117 | m_workspaces.clear(); |
| 5118 | setModified(true); |
| 5119 | Q_EMIT editorWorkspacesChanged(); |
| 5120 | Q_EMIT activeWorkspacesChanged(); |
| 5121 | } |
| 5122 | |
| 5123 | /** |
| 5124 | * @brief Renames the workspace with the given ID. |
no test coverage detected