|
Actually, it would be better to enable/disable the Rotate tool with the middle mouse button (click/drag/release scroll wheel), like many CAD programs can do.
Right now, by pressing it (and NOT releasing it yet), I can enable Rotate (so with WindowButtonDownFcn). With WindowButtonUpFcn I can disable it again, like this
% ---
...
if strcmp(get(gcf,'SelectionType'), 'extend')
disp('Enable Rotate.')
rotate3d
hManager = uigetmodemanager(gcf);
set(hManager.WindowListenerHandles,'Enable','off')
set(gcf,'WindowButtonUpFcn',@Released )
end
% ---
function Released(~,~)
if strcmp(get(gcf,'SelectionType'), 'extend')
disp('Disable Rotate.')
rotate3d
end
% ---
But then, while moving/dragging the mouse (so with the middle button still being pressed), nothing happens. The Rotate tool _is_ enabled, and the icon is also displayed instead of a pointer... But no actual rotation!
Anyone?
|