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( ... ...@@ -348,27 +348,23 @@ handles.pushbuttonClose = uicontrol( ...
num = num + 1; num = num + 1;
uicontrol( ... uicontrol( ...
'Parent', handles.uipanelResults, ... 'Parent', handles.uipanelResults, ...
'Tag', 'text8', ... 'Tag', 'vintage', ...
'Style', 'text', ... 'Style', 'text', ...
'Units', 'normalized', ... 'Units', 'normalized', ...
'Position', [spc*3 top-num*dheight dwidth*1.5 dheight/2], ... 'Position', [spc*3 top-num*dheight dwidth*1.5 dheight/2], ...
'String', 'vintage:', ... 'String', 'vintage:', ...
'HorizontalAlignment', 'left'); 'HorizontalAlignment', 'left');
if ~project_info.realtime_shock_decomposition_run
enable = 'Off';
else
enable = 'On';
end
handles.vintage = uicontrol( ... handles.vintage = uicontrol( ...
'Parent', handles.uipanelResults, ... 'Parent', handles.uipanelResults, ...
'Tag', 'vintage', ... 'Tag', 'vintage', ...
'String', '0', ...
'Style', 'edit', ... 'Style', 'edit', ...
'Units', 'normalized', ... 'Units', 'normalized', ...
'Position', [spc*3+dwidth*1.5 top-num*dheight dwidth*2 dheight/2], ... 'Position', [spc*3+dwidth*1.5 top-num*dheight dwidth*2 dheight/2], ...
'Value', 0, ... 'Value', 0);
'Enable', enable);
num = num + 1;
handles.use_shock_groups = uicontrol(... handles.use_shock_groups = uicontrol(...
'Parent', handles.uipanelResults, ... 'Parent', handles.uipanelResults, ...
'Style', 'checkbox',... 'Style', 'checkbox',...
...@@ -380,16 +376,14 @@ handles.pushbuttonClose = uicontrol( ... ...@@ -380,16 +376,14 @@ handles.pushbuttonClose = uicontrol( ...
function pushbuttonPlotShockDecomposition_Callback(hObject, ~) function pushbuttonPlotShockDecomposition_Callback(hObject, ~)
old_options = options_; old_options = options_;
if project_info.realtime_shock_decomposition_run if isempty(str2double(handles.vintage.String)) ...
if ~isnumeric(handles.vintage.Value) ... || ~isint(str2double(handles.vintage.String)) ...
|| ~isint(num2str(handles.vintage.Value)) ... || str2double(handles.vintage.String) < 0
|| num2str(handles.vintage.Value) < 0 gui_tools.show_warning('Vintage must be an integer >= 0');
gui_tools.show_warning('Vintage must be an integer >= 0'); uicontrol(hObject);
uicontrol(hObject); return
return
end
options_.plot_shock_decomp.vintage = handles.vintage.Value;
end end
options_.plot_shock_decomp.vintage = str2double(handles.vintage.String);
if handles.colormap.Value ~= 1 if handles.colormap.Value ~= 1
options_.plot_shock_decomp.colormap = handles.colormap.String{handles.colormap.Value}; 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