From bc0270d779112bb690e4b9f85617457fd5460b68 Mon Sep 17 00:00:00 2001
From: Jacques Grelet <Jacques.grelet@ird.fr>
Date: Fri, 11 Jan 2019 15:40:19 +0100
Subject: [PATCH] move disable print and printpreview at the end of map figure
 initialization instead of climatology callback

---
 tsgqc.m | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/tsgqc.m b/tsgqc.m
index 6df126c..68dee1b 100644
--- a/tsgqc.m
+++ b/tsgqc.m
@@ -1045,6 +1045,13 @@ uimenu(hMapPrintMenu,'Label','Save as',...
   'Tag','TAG_UIMENU_MAP_PRINT_SAVEAS',...
   'Callback', {@mapSaveAsCallback});
 
+% see issue #12 with bug on Matlab < R2014b
+% -----------------------------------------
+if verLessThan('matlab','8.4')
+  set(hMapPrintPrintMenu, 'enable', 'off');
+  set(hMapPrintPreviewMenu, 'enable', 'off');
+end
+
 % map Toolbar display menu
 % --------------------
 hMapToolbarMenu = uimenu(hMapFig,'Label','ToolBar', ...
@@ -4060,13 +4067,6 @@ end
     % ---------------------
     tsg = getappdata( hMainFig, 'tsg_data');
     
-    % see issue #12 with bug on Matlab < R2014b
-    % -----------------------------------------
-    if verLessThan('matlab','8.4')
-          set(hMapPrintPrintMenu, 'enable', 'off');
-          set(hMapPrintPreviewMenu, 'enable', 'off');
-    end
-    
     % check only the selected menu
     % -----------------------------
     hdls = findobj( '-regexp', 'tag', 'TAG_UIMENU_MAP_CLIMATOLOGY_WITH_');
-- 
GitLab