Skip to content

Commit 77c4a49

Browse files
Merge pull request #12 from ThFriedrich/patch-1
Fixed compatibility issues
2 parents 7297326 + 0f20c6f commit 77c4a49

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

GUI/generalFunc/turnOffFigureSelection.m

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,21 @@
1616
% Contact: sandra.vanaert@uantwerpen.be
1717
%--------------------------------------------------------------------------
1818

19+
% Determine Matlab version for compatibility
20+
v = version('-release');
21+
v = str2double(v(1:4));
22+
1923
% First turn off zoom, pan and datacursor
2024
h_pan = pan(h.fig);
2125
h_zoom = [h.zoom.in;h.zoom.out];
2226
h_cursor = datacursormode(h.fig);
2327
h_cursor.removeAllDataCursors();
2428
set(h_pan,'Enable','off')
2529
set(h_cursor,'Enable','off')
26-
zoomAxinFig(h,'off')
30+
31+
if v < 2019
32+
zoomAxinFig(h,'off')
33+
else
34+
h_z = zoom(h.fig);
35+
h_z.Enable = 'off';
36+
end

0 commit comments

Comments
 (0)