@@ -210,10 +210,19 @@ def create_input_file_tab(self, tab_control):
210210 command = self .browse_save_location )
211211 save_browse_button .grid (row = 3 , column = 2 , sticky = W , pady = 5 , padx = 5 )
212212
213- # Save button
213+ # Save button (diffs only)
214214 save_config_button = ttk .Button (file_ops_frame , text = "Save Configuration" ,
215- command = self .save_config_file )
215+ command = self .save_config_file )
216216 save_config_button .grid (row = 4 , column = 1 , sticky = W , pady = 10 , padx = 10 )
217+ save_config_desc = ttk .Label (file_ops_frame , text = "Writes only parameters that differ from defaults." )
218+ save_config_desc .grid (row = 4 , column = 2 , sticky = W , pady = 10 , padx = 5 )
219+
220+ # Save full button (all params)
221+ save_full_config_button = ttk .Button (file_ops_frame , text = "Save Full Configuration" ,
222+ command = self .save_full_config_file )
223+ save_full_config_button .grid (row = 5 , column = 1 , sticky = W , pady = 5 , padx = 10 )
224+ save_full_config_desc = ttk .Label (file_ops_frame , text = "Writes every parameter, including defaults." )
225+ save_full_config_desc .grid (row = 5 , column = 2 , sticky = W , pady = 5 , padx = 5 )
217226
218227 def create_domain_tab (self , tab_control ):
219228 # Create the 'Domain' tab
@@ -460,6 +469,31 @@ def save_config_file(self):
460469 messagebox .showerror ("Error" , error_msg )
461470 print (error_msg )
462471
472+ def save_full_config_file (self ):
473+ """Save the full configuration (including defaults) to a file"""
474+ save_path = self .save_config_entry .get ()
475+
476+ if not save_path :
477+ messagebox .showwarning ("Warning" , "Please specify a file path to save the configuration." )
478+ return
479+
480+ try :
481+ # Update dictionary with current entry values
482+ for field , entry in self .entries .items ():
483+ value = entry .get ()
484+ self .dic [field ] = None if value .strip () == '' else value
485+
486+ # Write the full configuration file
487+ aeolis .inout .write_configfile (save_path , self .dic , include_defaults = True )
488+
489+ messagebox .showinfo ("Success" , f"Full configuration saved to:\n { save_path } " )
490+
491+ except Exception as e :
492+ import traceback
493+ error_msg = f"Failed to save full config file: { str (e )} \n \n { traceback .format_exc ()} "
494+ messagebox .showerror ("Error" , error_msg )
495+ print (error_msg )
496+
463497 def toggle_color_limits (self ):
464498 """Enable or disable colorbar limit entries based on auto limits checkbox"""
465499 if self .auto_limits_var .get ():
0 commit comments