updateMenuButtons.m 981 B
function [] = updateMenuButtons()
%ENABLEMENUBUTTONS Summary of this function goes here
% Detailed explanation goes here
global artoaGui artoaDataInput artoaWorkspace;
%% Update menu buttons
if isfield(artoaDataInput, 'rfb') && ~islogical(artoaDataInput.rfb)
artoaGui.main.menus.edit.Enable = 'on';
artoaGui.main.menus.fileSave.Enable = 'on';
artoaGui.main.menus.track.Enable = 'on';
else
artoaGui.main.menus.edit.Enable = 'off';
artoaGui.main.menus.fileSave.Enable = 'off';
artoaGui.main.menus.track.Enable = 'off';
end
%% 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';
else
artoaGui.main.menus.editTimeOfArrival.Enable = 'off';
artoaGui.main.menus.showSatfixEtaToToa.Enable = 'off';
end
end