Skip to content
Snippets Groups Projects
Commit 60cfeed0 authored by jacques.grelet_ird.fr's avatar jacques.grelet_ird.fr
Browse files

add a dialog box to donwload the m_map toolbox if it is not installed

parent 0f462c54
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ Contact: <jacques.grelet@ird.fr>
## v1.50RC2 (2019-01-11)
+ add a dialog box to donwload the m_map toolbox if it is not installed
+ fix issue #12, resolve a bug with all print menus with Matlab version prior 8.4 (R2014). Menu print and Print preview are disable for these versions and saveas was replaced by screencapture function from "undocumented Matlab" web site.
+ add version date on the main TSQGQC figure
+ fix issue #11, improve print menu
......
......@@ -104,7 +104,7 @@ if ~isempty( ind )
% selected
% -----------------------------------------------------------------
if strcmp(get(hdl_pushtool_climato, 'state'), 'on')
% display debug infos
if DEBUGGING
fprintf(1, 'Plot climato on map:\n');
......@@ -152,9 +152,9 @@ if ~isempty( ind )
switch tsg.preference.map.climatology
case 'pcolor'
% mask climato range uipanel on map
set(findobj('tag', 'TAG_MAP_CLIMATO_UIPANEL'),'Visible', 'off');
set(findobj('tag', 'TAG_MAP_CLIMATO_UIPANEL'),'Visible', 'off');
% resize map panel for axes
set(findobj('tag', 'TAG_MAP_CLIMATO_AXES'),'Position',[0, 0, 1, 1])
set(findobj('tag', 'TAG_MAP_CLIMATO_AXES'),'Position',[0, 0, 1, 1])
% We shift half a grid point
dx = mean(diff(lon));
dy = mean(diff(lat));
......@@ -177,7 +177,7 @@ if ~isempty( ind )
case 'none'
colorbar('off');
% mask climato range uipanel on map
set(findobj('tag', 'TAG_MAP_CLIMATO_UIPANEL'),'Visible', 'off');
set(findobj('tag', 'TAG_MAP_CLIMATO_UIPANEL'),'Visible', 'off');
% resize map panel for axes
set(findobj('tag', 'TAG_MAP_CLIMATO_AXES'),'Position',[0, 0, 1, 1])
end
......@@ -205,7 +205,7 @@ if ~isempty( ind )
m_gshhs_l('patch',[.7 .7 .7], 'TAG', 'TAG_PLOT4_LINE_COAST');
else
s = load('world_l.mat');
end
end
case 3
% Intermediate-resolution coast lines
......@@ -214,7 +214,7 @@ if ~isempty( ind )
m_gshhs_i('patch',[.7 .7 .7], 'TAG', 'TAG_PLOT4_LINE_COAST');
else
s = load('world_i.mat');
end
end
case 4
% High-resolution coast lines
......@@ -223,7 +223,7 @@ if ~isempty( ind )
m_gshhs_h('patch',[.7 .7 .7], 'TAG', 'TAG_PLOT4_LINE_COAST');
else
s = load('world_h.mat');
end
end
otherwise
tsg.preference.map.resolution = 1;
......
......@@ -54,7 +54,7 @@ global DEFAULT_PATH_FILE
% -------------------------------------------------------------------
VERSION = 1.50; % -> 1.44
CHAR_VERSION = '1.50RC2';
DATE_VERSION = '01/14/2019';
DATE_VERSION = '01/15/2019';
% netcdf file version, see DATA FORMAT TSG document:
% CORTSG_format_gosud.doc
......@@ -207,6 +207,25 @@ if ~isempty(hMainFig)
end
% check if m_map toolbox is installed
% -----------------------------------
if ~exist('m_lldist.m','file')
% show dialog box when m_map toolbox is missing
% -----------------------------------------------
message = sprintf(['Sorry, but you do not seem to have the m_map Toolbox.\n',...
'Do you want install it ?']);
reply = questdlg(message, 'Toolbox missing', 'Yes', 'No', 'Yes');
if strcmpi(reply, 'No')
% User said No, so exit.
return
else
% User said Yes, go to m_map download page
web('https://www.eoas.ubc.ca/~rich/map.html');
return
end
end
% Create and then hide the GUI as it is being constructed.
% --------------------------------------------------------
hMainFig = figure(...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment