SqliteTableModel: Fix really stupid bug in insertRows() and removeRows()

This commit is contained in:
Martin Kleusberg
2013-04-10 20:44:00 +02:00
parent e5013da153
commit f73e3f0546

View File

@@ -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;
}