Skip to content

Commit 0f20c6f

Browse files
authored
Fixed compatibility issues
Fixed GUI interface compatibility issue causing StatSTEM GUI to crash under MATLAB 2019a when clicking button while in zoom mode.
1 parent 7297326 commit 0f20c6f

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)