mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Code cleanup - Stop calling the same 6 lines everywhere.
There's a method named refreshDisplay, fairly unused, let's use it a bit mroe. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
This commit is contained in:
		
							parent
							
								
									69d4ccae6d
								
							
						
					
					
						commit
						d9afcdc8cb
					
				
					 1 changed files with 4 additions and 21 deletions
				
			
		|  | @ -783,13 +783,7 @@ void MainWindow::importFiles(const QStringList fileNames) | |||
| 		} | ||||
| 	} | ||||
| 	process_dives(TRUE, FALSE); | ||||
| 
 | ||||
| 	ui.InfoWidget->reload(); | ||||
| 	ui.globe->reload(); | ||||
| 	ui.ListWidget->reload(DiveTripModel::TREE); | ||||
| 	ui.ListWidget->setFocus(); | ||||
| 	WSInfoModel *wsim = WSInfoModel::instance(); | ||||
| 	wsim->updateInfo(); | ||||
| 	refreshDisplay(); | ||||
| } | ||||
| 
 | ||||
| void MainWindow::loadFiles(const QStringList fileNames) | ||||
|  | @ -814,25 +808,14 @@ void MainWindow::loadFiles(const QStringList fileNames) | |||
| 
 | ||||
| 	process_dives(FALSE, FALSE); | ||||
| 
 | ||||
| 	ui.InfoWidget->reload(); | ||||
| 	ui.globe->reload(); | ||||
| 	ui.ListWidget->reload(DiveTripModel::TREE); | ||||
| 	ui.ListWidget->setFocus(); | ||||
| 	WSInfoModel *wsim = WSInfoModel::instance(); | ||||
| 	wsim->updateInfo(); | ||||
| 	refreshDisplay(); | ||||
| 	ui.actionAutoGroup->setChecked(autogroup); | ||||
| } | ||||
| 
 | ||||
| void MainWindow::on_actionImportCSV_triggered() | ||||
| { | ||||
| 	CSVImportDialog *csvImport = new(CSVImportDialog); | ||||
| 	CSVImportDialog *csvImport = new CSVImportDialog(); | ||||
| 	csvImport->show(); | ||||
| 	process_dives(TRUE, FALSE); | ||||
| 
 | ||||
| 	ui.InfoWidget->reload(); | ||||
| 	ui.globe->reload(); | ||||
| 	ui.ListWidget->reload(DiveTripModel::TREE); | ||||
| 	ui.ListWidget->setFocus(); | ||||
| 	WSInfoModel *wsim = WSInfoModel::instance(); | ||||
| 	wsim->updateInfo(); | ||||
| 	refreshDisplay(); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue