Skip to content

Commit

Permalink
fix(UI): disable ax interactions when using rbbox
Browse files Browse the repository at this point in the history
The previous fallback code restored an interaction bug.
  • Loading branch information
ocehugo committed Nov 27, 2020
1 parent c6e3db8 commit 60d3cc5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Util/select_points.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@
delete(rec);
else
axes(hAx);
k = waitforbuttonpress;
disableDefaultInteractivity(hAx);
waitforbuttonpress;
point1 = get(gca, 'CurrentPoint'); % button down detected
finalRect = rbbox; % return figure units
rbbox; % return figure units
point2 = get(gca, 'CurrentPoint'); % button up detected
disableDefaultInteractivity(hAx);
point1 = point1(1, 1:2); % extract x and y
point2 = point2(1, 1:2);
p1 = min(point1, point2); % calculate locations
Expand Down

0 comments on commit 60d3cc5

Please sign in to comment.