mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-10 15:22:30 +01:00
Message displaying disabled if messages got removed.
This commit is contained in:
parent
6e7312e3e7
commit
0e83739327
@ -62,6 +62,9 @@ void MessagesView::reloadSelections(int mark_current_index_read) {
|
|||||||
current_index = m_proxyModel->mapFromSource(m_sourceModel->index(mapped_current_index.row(),
|
current_index = m_proxyModel->mapFromSource(m_sourceModel->index(mapped_current_index.row(),
|
||||||
mapped_current_index.column()));
|
mapped_current_index.column()));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (current_index.isValid()) {
|
||||||
if (mark_current_index_read == 0) {
|
if (mark_current_index_read == 0) {
|
||||||
// User selected to mark some messages as unread, if one
|
// User selected to mark some messages as unread, if one
|
||||||
// of them will be marked as current, then it will be read again.
|
// of them will be marked as current, then it will be read again.
|
||||||
@ -75,6 +78,14 @@ void MessagesView::reloadSelections(int mark_current_index_read) {
|
|||||||
|
|
||||||
scrollTo(current_index);
|
scrollTo(current_index);
|
||||||
reselectIndexes(selected_indexes);
|
reselectIndexes(selected_indexes);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Messages were probably removed from the model, nothing can
|
||||||
|
// be selected and no message can be displayed.
|
||||||
|
// TOTO: Check if this is OKAY. If not, then emit this signal
|
||||||
|
// from FeedsView itself.
|
||||||
|
emit currentMessageRemoved();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MessagesModel *MessagesView::sourceModel() {
|
MessagesModel *MessagesView::sourceModel() {
|
||||||
|
Loading…
Reference in New Issue
Block a user