mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 19:10:06 +00:00
modified code to avoid cast from size_t to int properly
This commit is contained in:
parent
19415cd0a1
commit
20fd03bbdb
1 changed files with 2 additions and 5 deletions
|
|
@ -241,12 +241,9 @@ bool MarkerModel::setData(const QModelIndex& index,
|
||||||
void MarkerModel::HandleMarkerAdded()
|
void MarkerModel::HandleMarkerAdded()
|
||||||
{
|
{
|
||||||
QModelIndex topLeft = createIndex(0, kFirstColumn);
|
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);
|
const int newIndex = static_cast<int>(p->markerManager_->marker_count() - 1);
|
||||||
|
QModelIndex bottomRight = createIndex(newIndex, kLastColumn);
|
||||||
|
|
||||||
beginInsertRows(QModelIndex(), newIndex, newIndex);
|
beginInsertRows(QModelIndex(), newIndex, newIndex);
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue