Skip to content

Commit 716e955

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 903e491 + 77c4a49 commit 716e955

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

GUI/generalFunc/turnOffFigureSelection.m

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
function [h_pan,h_zoom,h_cursor] = turnOffFigureSelection(h)
2+
<<<<<<< HEAD
23
% turnOffFigureSelection - Turn off zoom, pan and datacursor
34
%
45
% syntax: [h_pan,h_zoom,h_cursor] = turnOffFigureSelection(h)
@@ -33,4 +34,40 @@
3334
h_z = zoom(h.fig);
3435
h_z.Enable = 'off';
3536
end
37+
=======
38+
% turnOffFigureSelection - Turn off zoom, pan and datacursor
39+
%
40+
% syntax: [h_pan,h_zoom,h_cursor] = turnOffFigureSelection(h)
41+
% h - structure holding references to GUI interface
42+
% h_pan - reference to pan object
43+
% h_zoom - reference to zoom buttons
44+
% h_cursor - reference to datacrusor object
45+
%
46+
47+
%--------------------------------------------------------------------------
48+
% This file is part of StatSTEM
49+
%
50+
% Copyright: 2016, EMAT, University of Antwerp
51+
% License: Open Source under GPLv3
52+
% Contact: sandra.vanaert@uantwerpen.be
53+
%--------------------------------------------------------------------------
54+
55+
% Determine Matlab version for compatibility
56+
v = version('-release');
57+
v = str2double(v(1:4));
58+
59+
% First turn off zoom, pan and datacursor
60+
h_pan = pan(h.fig);
61+
h_zoom = [h.zoom.in;h.zoom.out];
62+
h_cursor = datacursormode(h.fig);
63+
h_cursor.removeAllDataCursors();
64+
set(h_pan,'Enable','off')
65+
set(h_cursor,'Enable','off')
66+
67+
if v < 2019
68+
zoomAxinFig(h,'off')
69+
else
70+
h_z = zoom(h.fig);
71+
h_z.Enable = 'off';
72+
>>>>>>> upstream/master
3673
end

0 commit comments

Comments
 (0)