mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 01:40:04 +00:00 
			
		
		
		
	removed unneded dataChanged calls in MarkerModel
This commit is contained in:
		
							parent
							
								
									a82e379f9b
								
							
						
					
					
						commit
						fe9311325b
					
				
					 1 changed files with 0 additions and 12 deletions
				
			
		|  | @ -255,25 +255,17 @@ bool MarkerModel::setData(const QModelIndex& index, | ||||||
| void MarkerModel::HandleMarkersInitialized(size_t count) | void MarkerModel::HandleMarkersInitialized(size_t count) | ||||||
| { | { | ||||||
|    const int index = static_cast<int>(count - 1); |    const int index = static_cast<int>(count - 1); | ||||||
|    QModelIndex topLeft = createIndex(0, kFirstColumn); |  | ||||||
|    QModelIndex bottomRight = createIndex(index, kLastColumn); |  | ||||||
| 
 | 
 | ||||||
|    beginInsertRows(QModelIndex(), 0, index); |    beginInsertRows(QModelIndex(), 0, index); | ||||||
|    endInsertRows(); |    endInsertRows(); | ||||||
| 
 |  | ||||||
|    Q_EMIT dataChanged(topLeft, bottomRight); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void MarkerModel::HandleMarkerAdded() | void MarkerModel::HandleMarkerAdded() | ||||||
| { | { | ||||||
|    const int newIndex = static_cast<int>(p->markerManager_->marker_count() - 1); |    const int newIndex = static_cast<int>(p->markerManager_->marker_count() - 1); | ||||||
|    QModelIndex topLeft = createIndex(newIndex, kFirstColumn); |  | ||||||
|    QModelIndex bottomRight = createIndex(newIndex, kLastColumn); |  | ||||||
| 
 | 
 | ||||||
|    beginInsertRows(QModelIndex(), newIndex, newIndex); |    beginInsertRows(QModelIndex(), newIndex, newIndex); | ||||||
|    endInsertRows(); |    endInsertRows(); | ||||||
| 
 |  | ||||||
|    Q_EMIT dataChanged(topLeft, bottomRight); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void MarkerModel::HandleMarkerChanged(size_t index) | void MarkerModel::HandleMarkerChanged(size_t index) | ||||||
|  | @ -288,13 +280,9 @@ void MarkerModel::HandleMarkerChanged(size_t index) | ||||||
| void MarkerModel::HandleMarkerRemoved(size_t index) | void MarkerModel::HandleMarkerRemoved(size_t index) | ||||||
| { | { | ||||||
|    const int removedIndex = static_cast<int>(index); |    const int removedIndex = static_cast<int>(index); | ||||||
|    QModelIndex topLeft = createIndex(removedIndex, kFirstColumn); |  | ||||||
|    QModelIndex bottomRight = createIndex(removedIndex, kLastColumn); |  | ||||||
| 
 | 
 | ||||||
|    beginRemoveRows(QModelIndex(), removedIndex, removedIndex); |    beginRemoveRows(QModelIndex(), removedIndex, removedIndex); | ||||||
|    endRemoveRows(); |    endRemoveRows(); | ||||||
| 
 |  | ||||||
|    Q_EMIT dataChanged(topLeft, bottomRight); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| } // namespace model
 | } // namespace model
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak