diff --git a/headwordsmodel.cpp b/headwordsmodel.cpp index 3d4d7f69..b486fb30 100644 --- a/headwordsmodel.cpp +++ b/headwordsmodel.cpp @@ -81,12 +81,12 @@ void HeadwordListModel::requestFinished() filtered << w; } } + if( filtered.isEmpty() ) + return; beginInsertRows( QModelIndex(), words.size(), words.size() + filtered.count() - 1 ); - for( const auto & word : filtered ) words.append( word ); - endInsertRows(); } }