on xenial help sign in
fixes
commitf4119516c071cb385a01be780a50d63981b3272f authorMichael Zanetti <michael.zanetti@canonical.com> dateFri 13 May 2016, 13:34 (10 years ago) parentb031589
1 file changed+8−3
plugins/Unity/Launcher/launchermodel.cpp+8−3
plugins/Unity/Launcher/launchermodel.cpp+8−3
@@ -576,16 +576,21 @@ void LauncherModel::applicationRemoved(const QModelIndex &parent, int row)
576576 }
577577
578578 LauncherItem * item = m_list.at(appIndex);
579− item->setRunning(false);
580579
581580 if (!item->pinned()) {
582581 beginRemoveRows(QModelIndex(), appIndex, appIndex);
583582 m_list.takeAt(appIndex)->deleteLater();
584583 endRemoveRows();
585584 m_asAdapter->syncItems(m_list);
586− Q_EMIT dataChanged(index(appIndex), index(appIndex), {RolePinned});
585+ } else {
586+ QVector<int> changedRoles = {RoleRunning};
587+ item->setRunning(false);
588+ if (item->focused()) {
589+ changedRoles << RoleFocused;
590+ item->setFocused(false);
591+ }
592+ Q_EMIT dataChanged(index(appIndex), index(appIndex), changedRoles);
587593 }
588− Q_EMIT dataChanged(index(appIndex), index(appIndex), {RoleRunning});
589594}
590595
591596void LauncherModel::focusedAppIdChanged()