modified code to avoid cast from size_t to int properly

This commit is contained in:
AdenKoperczak 2024-10-05 14:23:11 -04:00
parent 19415cd0a1
commit 20fd03bbdb

View file

@ -241,12 +241,9 @@ bool MarkerModel::setData(const QModelIndex& index,
void MarkerModel::HandleMarkerAdded()
{
QModelIndex topLeft = createIndex(0, kFirstColumn);
QModelIndex bottomRight =
createIndex(p->markerManager_->marker_count() - 1, kLastColumn);
logger_->debug("marker_count: {}", p->markerManager_->marker_count());
const int newIndex = static_cast<int>(p->markerManager_->marker_count() - 1);
QModelIndex bottomRight = createIndex(newIndex, kLastColumn);
beginInsertRows(QModelIndex(), newIndex, newIndex);
endInsertRows();