@@ -115,7 +115,15 @@ void Scopes::onScopesLoaded()
116void Scopes::onScopeRemoved(const unity::dash::Scope::Ptr& scope)
116void Scopes::onScopeRemoved(const unity::dash::Scope::Ptr& scope)
118− //TODO
118+ auto index = m_scopes.count();
119+ auto id = QString::fromStdString(scope->id);
120+ beginRemoveRows(QModelIndex(), index, index);
121+ auto removed_idx = removeUnityScope(id);
124+ if (removed_idx >= 0) {
125+ Q_EMIT scopeRemoved(id, removed_idx);
121void Scopes::onScopesReordered(const unity::dash::Scopes::ScopeList& scopes)
129void Scopes::onScopesReordered(const unity::dash::Scopes::ScopeList& scopes)
@@ -144,3 +152,14 @@ void Scopes::removeUnityScope(int index)
145 delete scope;
153 delete scope;
156+int Scopes::removeUnityScope(const QString& scope_id)
158+ for (int i=0; i<m_scopes.count(); i++) {
159+ if (m_scopes[i]->id() == scope_id) {
160+ removeUnityScope(i);