mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
SqliteTableModel: Fix really stupid bug in insertRows() and removeRows()
This commit is contained in:
@@ -172,6 +172,8 @@ bool SqliteTableModel::insertRows(int row, int count, const QModelIndex& parent)
|
||||
m_data[row].replace(0, QByteArray::number(m_db->addRecord(m_sTable)));
|
||||
}
|
||||
|
||||
m_rowCount += count;
|
||||
|
||||
endInsertRows();
|
||||
return true;
|
||||
}
|
||||
@@ -186,6 +188,8 @@ bool SqliteTableModel::removeRows(int row, int count, const QModelIndex& parent)
|
||||
m_data.removeAt(row + i);
|
||||
}
|
||||
|
||||
m_rowCount -= count;
|
||||
|
||||
endRemoveRows();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user