File tree Expand file tree Collapse file tree
common/views/EditableTableView Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -414,9 +414,17 @@ void EditableTableView::onRemoveAction()
414414 // Remove selected rows. Removal starts from the back of the selected indexes to remove correct rows.
415415 // Sorting model apparently returns indexes in correct order when selectedIndexes() is called, which makes
416416 // reverse removal possible.
417+
418+ // If multiple indices on same row are selected, don't try to remove same row multiple times
419+ QSet<int > removedRows;
417420 auto sortProxy = dynamic_cast <QSortFilterProxyModel*>(model ());
421+
418422 for (auto it = indexes.crbegin (); it != indexes.crend (); ++it)
419423 {
424+ if (removedRows.contains (it->row ()))
425+ continue ;
426+
427+ removedRows.insert (it->row ());
420428 if (sortProxy)
421429 {
422430 emit removeItem (sortProxy->mapToSource (*it));
You can’t perform that action at this time.
0 commit comments