mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Cleanup: remove DiveImportedModel::setImportedDivesIndexes()
This function resets the DiveImportedModel. It takes two arguments: first and last index. All callers passed in 0 and number-of dives anyway, so remove the arguments. Since this now does the same as repopulate(), merge the two functions. Moreover, implement Qt-model semantics by using a beginResetModel()/endResetModel() pair. This simplifies the code. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									abf942f303
								
							
						
					
					
						commit
						6febe22b6b
					
				
					 2 changed files with 10 additions and 22 deletions
				
			
		|  | @ -492,10 +492,7 @@ void DownloadFromDCWidget::onDownloadThreadFinished() | |||
| 	} | ||||
| 	ui.downloadCancelRetryButton->setText(tr("Retry download")); | ||||
| 	ui.downloadCancelRetryButton->setEnabled(true); | ||||
| 	// regardless, if we got dives, we should show them to the user
 | ||||
| 	if (downloadTable.nr) { | ||||
| 		diveImportedModel->setImportedDivesIndexes(0, downloadTable.nr - 1); | ||||
| 	} | ||||
| 	diveImportedModel->repopulate(); | ||||
| } | ||||
| 
 | ||||
| void DownloadFromDCWidget::on_cancel_clicked() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue