# Serge Roussak [email protected]
diff -urp a/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp b/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp
a
|
b
|
void UIHotKeyTableModel::sort(int iColum
|
497 | 497 | void UIHotKeyTableModel::applyFilter() |
498 | 498 | { |
499 | 499 | /* Erase items first: */ |
500 | | beginRemoveRows(QModelIndex(), 0, m_filteredShortcuts.size() - 1); |
| 500 | beginRemoveRows(QModelIndex(), 0, qMax(m_filteredShortcuts.size() - 1, 0)); |
501 | 501 | m_filteredShortcuts.clear(); |
502 | 502 | endRemoveRows(); |
503 | 503 | |
… |
… |
void UIHotKeyTableModel::applyFilter()
|
520 | 520 | m_filteredShortcuts << item; |
521 | 521 | } |
522 | 522 | } |
523 | | beginInsertRows(QModelIndex(), 0, m_filteredShortcuts.size() - 1); |
| 523 | beginInsertRows(QModelIndex(), 0, qMax(m_filteredShortcuts.size() - 1, 0)); |
524 | 524 | endInsertRows(); |
525 | 525 | } |
526 | 526 | |