Better check
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
5a54d80c6e
commit
2526275c5e
@ -290,7 +290,8 @@ void InstanceList::deleteGroup(const GroupId& name)
|
|||||||
qDebug() << "Remove" << instID << "from group" << name;
|
qDebug() << "Remove" << instID << "from group" << name;
|
||||||
removed = true;
|
removed = true;
|
||||||
auto idx = getInstIndex(instance.get());
|
auto idx = getInstIndex(instance.get());
|
||||||
emit dataChanged(index(idx), index(idx), { GroupRole });
|
if (idx >= 0)
|
||||||
|
emit dataChanged(index(idx), index(idx), { GroupRole });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (removed)
|
if (removed)
|
||||||
@ -314,7 +315,8 @@ void InstanceList::renameGroup(const QString& src, const QString& dst)
|
|||||||
qDebug() << "Set" << instID << "group to" << dst;
|
qDebug() << "Set" << instID << "group to" << dst;
|
||||||
modified = true;
|
modified = true;
|
||||||
auto idx = getInstIndex(instance.get());
|
auto idx = getInstIndex(instance.get());
|
||||||
emit dataChanged(index(idx), index(idx), { GroupRole });
|
if (idx >= 0)
|
||||||
|
emit dataChanged(index(idx), index(idx), { GroupRole });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (modified)
|
if (modified)
|
||||||
|
Loading…
Reference in New Issue
Block a user