Skip to content
Snippets Groups Projects
Verified Commit a0bdecd2 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

plot_shock_decomposition: always display all vintage option

parent 9b4ef14f
No related branches found
No related tags found
No related merge requests found
......@@ -348,27 +348,23 @@ handles.pushbuttonClose = uicontrol( ...
num = num + 1;
uicontrol( ...
'Parent', handles.uipanelResults, ...
'Tag', 'text8', ...
'Tag', 'vintage', ...
'Style', 'text', ...
'Units', 'normalized', ...
'Position', [spc*3 top-num*dheight dwidth*1.5 dheight/2], ...
'String', 'vintage:', ...
'HorizontalAlignment', 'left');
if ~project_info.realtime_shock_decomposition_run
enable = 'Off';
else
enable = 'On';
end
handles.vintage = uicontrol( ...
'Parent', handles.uipanelResults, ...
'Tag', 'vintage', ...
'String', '0', ...
'Style', 'edit', ...
'Units', 'normalized', ...
'Position', [spc*3+dwidth*1.5 top-num*dheight dwidth*2 dheight/2], ...
'Value', 0, ...
'Enable', enable);
'Value', 0);
num = num + 1;
handles.use_shock_groups = uicontrol(...
'Parent', handles.uipanelResults, ...
'Style', 'checkbox',...
......@@ -380,16 +376,14 @@ handles.pushbuttonClose = uicontrol( ...
function pushbuttonPlotShockDecomposition_Callback(hObject, ~)
old_options = options_;
if project_info.realtime_shock_decomposition_run
if ~isnumeric(handles.vintage.Value) ...
|| ~isint(num2str(handles.vintage.Value)) ...
|| num2str(handles.vintage.Value) < 0
if isempty(str2double(handles.vintage.String)) ...
|| ~isint(str2double(handles.vintage.String)) ...
|| str2double(handles.vintage.String) < 0
gui_tools.show_warning('Vintage must be an integer >= 0');
uicontrol(hObject);
return
end
options_.plot_shock_decomp.vintage = handles.vintage.Value;
end
options_.plot_shock_decomp.vintage = str2double(handles.vintage.String);
if handles.colormap.Value ~= 1
options_.plot_shock_decomp.colormap = handles.colormap.String{handles.colormap.Value};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment