Merge PR #332: Fix an assertion when there are no tags

This commit is contained in:
Jenkins nymea 2020-02-19 22:58:21 +01:00
commit fa149688da

View File

@ -82,6 +82,9 @@ void Tags::addTag(Tag *tag)
void Tags::addTags(QList<Tag *> tags)
{
if (tags.isEmpty()) {
return;
}
beginInsertRows(QModelIndex(), m_list.count(), m_list.count() + tags.count() - 1);
foreach (Tag *tag, tags) {
tag->setParent(this);