function UpdateSettings(fighandle)
% UpdateSettings(FIGHANDLE)

% This function shows which files and settings are currently active in the
% redAnTS window Current Settings panel. FIGHANDLE is the handle to the
% main GUI figure from the redAnTS handles struct: handles.mainguifig


% get the handles structure from the main GUI
handles=guidata(fighandle);

% make the default text for inactive settings
NoFile='None';

% for each setting to indicate, change the string to either the default
% value or the current value
if isfield(handles, 'meshfile')
    set(handles.mesh_text, 'String', handles.meshfile);
else
    set(handles.mesh_text, 'String', NoFile);
end

if isfield(handles, 'inputtext')
    set(handles.input_text, 'String', handles.inputtext);
else
    set(handles.input_text, 'String', NoFile);
end

if isfield(handles, 'solutionexists')
    set(handles.solution_text, 'String', handles.solutionexists);
else
    set(handles.solution_text, 'String', NoFile);
end

if isfield(handles, 'postprocfile')
    set(handles.postproc_text, 'String', handles.postprocfile);
else
    set(handles.postproc_text, 'String', NoFile);
end

% Update handles structure
guidata(fighandle,handles);