Newer
Older
leprob001
committed
function [] = updateMenuButtons()
%ENABLEMENUBUTTONS Summary of this function goes here
% Detailed explanation goes here
leprob001
committed
global artoaGui artoaDataInput artoaWorkspace;
leprob001
committed
%% Update menu buttons
if isfield(artoaDataInput, 'rfb') && ~islogical(artoaDataInput.rfb)
artoaGui.main.menus.edit.Enable = 'on';
artoaGui.main.menus.fileSave.Enable = 'on';
leprob001
committed
else
artoaGui.main.menus.edit.Enable = 'off';
artoaGui.main.menus.fileSave.Enable = 'off';
leprob001
committed
end
leprob001
committed
%% If no pressure and temperature is selected, the time of arrival window should be disabled
if (any(artoaWorkspace.statusTemperature == 1) && any(artoaWorkspace.statusPressure == 1))
artoaGui.main.menus.editTimeOfArrival.Enable = 'on';
artoaGui.main.menus.showSatfixEtaToToa.Enable = 'on';
leprob001
committed
else
artoaGui.main.menus.editTimeOfArrival.Enable = 'off';
artoaGui.main.menus.showSatfixEtaToToa.Enable = 'off';
leprob001
committed
end