Changeset 1112 for trunk/src/mouse_up.m


Ignore:
Timestamp:
Jan 26, 2022, 7:37:21 PM (2 years ago)
Author:
sommeria
Message:

set_slice separated from geometrey_calib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mouse_up.m

    r1107 r1112  
    363363    RulerCoord=[AxeData.RulerCoord ;xy(1,1:2)];% append the recorded ruler origin to the current mouse coordinates
    364364    RulerCoord=diff(RulerCoord,1);% coordiante difference between segment end and beginning
    365     RulerCoord=RulerCoord(1)+i*RulerCoord(2);
     365    RulerCoord=RulerCoord(1)+1i*RulerCoord(2);
    366366    distance=abs(RulerCoord);
    367367    azimuth=(180/pi)*angle(RulerCoord);
    368368    msgbox_uvmat('RULER','',['length: ' num2str(distance,3) ',  angle(degrees): ' num2str(azimuth,3)])
     369    if isfield(AxeData,'RulerHanle')&&~isempty(findobj(AxeData.RulerHandle))
    369370    delete(AxeData.RulerHandle)%delete the ruler graphic object
    370371    AxeData=rmfield(AxeData,'RulerHandle');%remove the ruler handle in AxeData
     372    end
    371373    AxeData.Drawing='off';%exit the ruler drawing mode
    372374end
Note: See TracChangeset for help on using the changeset viewer.