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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user