Skip to content

Commit fab6181

Browse files
committed
qml: Handle removal of first recipient properly
1 parent 3b15c2a commit fab6181

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/qml/models/sendrecipientslistmodel.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ void SendRecipientsListModel::remove()
9393
endRemoveRows();
9494
Q_EMIT countChanged();
9595

96-
setCurrentIndex(m_current - 1);
96+
if (m_current > 1) {
97+
setCurrentIndex(m_current - 1);
98+
} else {
99+
Q_EMIT currentRecipientChanged();
100+
}
97101
}
98102

99103
SendRecipient* SendRecipientsListModel::currentRecipient() const

0 commit comments

Comments
 (0)