Skip to content
Snippets Groups Projects
Commit 09d7cd3a authored by Stepan Salenikovich's avatar Stepan Salenikovich
Browse files

RecentModel: do not clear selection model

If the CallModel has an invalid index selected, do not clear the
selection in the RecentModel.

Change-Id: Ide91bf55d885f06746c9baf7c64fe07978f4dd65
Tuleap: #203
parent 4fd15aa8
No related branches found
No related tags found
No related merge requests found
...@@ -1057,9 +1057,12 @@ RecentModelPrivate::slotCurrentCallChanged(const QModelIndex &current, const QMo ...@@ -1057,9 +1057,12 @@ RecentModelPrivate::slotCurrentCallChanged(const QModelIndex &current, const QMo
q_ptr->selectionModel()->setCurrentIndex(callIdx, QItemSelectionModel::ClearAndSelect); q_ptr->selectionModel()->setCurrentIndex(callIdx, QItemSelectionModel::ClearAndSelect);
else else
q_ptr->selectionModel()->setCurrentIndex(callIdx.parent(), QItemSelectionModel::ClearAndSelect); q_ptr->selectionModel()->setCurrentIndex(callIdx.parent(), QItemSelectionModel::ClearAndSelect);
} else {
q_ptr->selectionModel()->clearCurrentIndex();
} }
/* do not update the selection in the RecentModel if no calls selected in the CallModel;
* eg: if a Call was selected in the RecentModel, when its removed, the seleciton will
* change automatically, so no action is needed;
* if a Person was selected and the Call is over, we still want the Person to be selected;
*/
} }
///Filter out every data relevant to a person ///Filter out every data relevant to a person
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment