From 9d446718e2f9a74f9363ae919ea2ec406bd38aba Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Tue, 5 Jan 2021 14:05:44 +0100 Subject: {TrustedHost,Favourite}Collection: fix duplicating/removing the last item Fixes: #112 --- src/trustedhostcollection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/trustedhostcollection.cpp') diff --git a/src/trustedhostcollection.cpp b/src/trustedhostcollection.cpp index 5171fd3..bbc7720 100644 --- a/src/trustedhostcollection.cpp +++ b/src/trustedhostcollection.cpp @@ -142,7 +142,7 @@ void TrustedHostCollection::remove(const QModelIndex &index) return; if(index.row() < 0 or index.row() >= items.size()) return; - beginRemoveRows(QModelIndex{}, index.row(), index.row() + 1); + beginRemoveRows(QModelIndex{}, index.row(), index.row()); items.removeAt(index.row()); endRemoveRows(); } -- cgit v1.2.3