diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 5700acd302509539da54944732bde6a793f802d6..35c4773fc992c079e167f66f150782de2860487e 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -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 diff --git a/tsg_util/plot_map.m b/tsg_util/plot_map.m index 95c6298931fa92c8097a5fb801a2a6c5dfa27c5f..71ae3cbd7b9d3d27bf88161dd74787ef8dd2332d 100644 --- a/tsg_util/plot_map.m +++ b/tsg_util/plot_map.m @@ -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; diff --git a/tsgqc.m b/tsgqc.m index 419a5a853280f8ad3762eaaf28091ca436883116..e75a846db7da274c2a5e9b3dff8ef77cbcffa834 100644 --- a/tsgqc.m +++ b/tsgqc.m @@ -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(...