1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-25 11:34:09 -04:00

Fix assertion when removing all elements from model

This commit is contained in:
Jon Beniston
2021-04-13 10:14:54 +01:00
parent 6ad057e935
commit 53cccf7298
4 changed files with 36 additions and 24 deletions
+7 -4
View File
@@ -351,10 +351,13 @@ public:
void removeAll()
{
beginRemoveRows(QModelIndex(), 0, m_items.count());
m_items.clear();
m_selected.clear();
endRemoveRows();
if (m_items.count() > 0)
{
beginRemoveRows(QModelIndex(), 0, m_items.count());
m_items.clear();
m_selected.clear();
endRemoveRows();
}
}
void setDisplayNames(bool displayNames)