mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Clear the list of events when closing data file
When the data file is closed we should reset the events that we offer for filtering. Reported-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									6f66781b1f
								
							
						
					
					
						commit
						0f2fac265f
					
				
					 3 changed files with 7 additions and 0 deletions
				
			
		
							
								
								
									
										1
									
								
								dive.h
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								dive.h
									
										
									
									
									
								
							|  | @ -552,6 +552,7 @@ extern void add_location(const char *string); | |||
| extern void add_suit(const char *string); | ||||
| extern void remember_event(const char *eventname); | ||||
| extern void evn_foreach(void (*callback)(const char *, int *, void *), void *data); | ||||
| extern void clear_events(void); | ||||
| 
 | ||||
| extern int add_new_dive(struct dive *dive); | ||||
| extern gboolean edit_trip(dive_trip_t *trip); | ||||
|  |  | |||
|  | @ -248,6 +248,7 @@ static void file_close(GtkWidget *w, gpointer data) | |||
| 	selected_dive = 0; | ||||
| 	process_selected_dives(); | ||||
| 	clear_stats_widgets(); | ||||
| 	clear_events(); | ||||
| 
 | ||||
| 	/* clear the equipment page */ | ||||
| 	clear_equipment_widgets(); | ||||
|  |  | |||
|  | @ -313,6 +313,11 @@ void evn_foreach(void (*callback)(const char *, int *, void *), void *data) | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| void clear_events(void) | ||||
| { | ||||
| 	evn_used = 0; | ||||
| } | ||||
| 
 | ||||
| void remember_event(const char *eventname) | ||||
| { | ||||
| 	int i = 0, len; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue