Skip to content
Snippets Groups Projects
updateMenuButtons.m 981 B
Newer Older
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';
%% 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';