mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Correctly mark divelist changed after accepting dive plan
Commit 293126257b20 ("Mark divelist as changed if user accepts planned
dive") had the correct commit message but an incorrect implementation.
This moves the mark_divelist_changed() call into the GTK_RESPONSE_ACCEPT
clause where it belongs.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
			
			
This commit is contained in:
		
							parent
							
								
									71c8234413
								
							
						
					
					
						commit
						2cee400ad1
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -618,7 +618,6 @@ void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep)
 | 
				
			||||||
	add_plan_to_notes(diveplan, dive);
 | 
						add_plan_to_notes(diveplan, dive);
 | 
				
			||||||
	/* now make the dive visible in the dive list */
 | 
						/* now make the dive visible in the dive list */
 | 
				
			||||||
	report_dives(FALSE, FALSE);
 | 
						report_dives(FALSE, FALSE);
 | 
				
			||||||
	mark_divelist_changed(TRUE);
 | 
					 | 
				
			||||||
	show_and_select_dive(dive);
 | 
						show_and_select_dive(dive);
 | 
				
			||||||
	free(stoplevels);
 | 
						free(stoplevels);
 | 
				
			||||||
	free(gaschanges);
 | 
						free(gaschanges);
 | 
				
			||||||
| 
						 | 
					@ -1172,6 +1171,7 @@ void input_plan()
 | 
				
			||||||
	gtk_widget_show_all(planner);
 | 
						gtk_widget_show_all(planner);
 | 
				
			||||||
	if (gtk_dialog_run(GTK_DIALOG(planner)) == GTK_RESPONSE_ACCEPT) {
 | 
						if (gtk_dialog_run(GTK_DIALOG(planner)) == GTK_RESPONSE_ACCEPT) {
 | 
				
			||||||
		plan(&diveplan, &cache_data, &planned_dive);
 | 
							plan(&diveplan, &cache_data, &planned_dive);
 | 
				
			||||||
 | 
							mark_divelist_changed(TRUE);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		if (planned_dive) {
 | 
							if (planned_dive) {
 | 
				
			||||||
			/* we have added a dive during the dynamic construction
 | 
								/* we have added a dive during the dynamic construction
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue