Changeset 246 for trunk/src/series.m
- Timestamp:
- Apr 28, 2011, 10:52:31 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r244 r246 129 129 % set(handles.VelTypeMenu,'String',param.VelTypeMenu) 130 130 % end 131 set(hObject,'WindowButtonUpFcn',{ @mouse_up_gui,handles})131 set(hObject,'WindowButtonUpFcn',{'mouse_up_gui',handles}) 132 132 NomType_Callback(hObject, eventdata, handles) 133 133 … … 1858 1858 end 1859 1859 1860 %-----------------------------1861 function mouse_up_gui(hObject,eventdata,handles)1862 if isequal(get(hObject,'SelectionType'),'alt')1863 set(hObject,'Units','pixels')1864 series_pos=get(hObject,'Position');%position of the GUI series (in pixels)1865 set(hObject,'Units','normalized')1866 xy_fig=get(hObject,'CurrentPoint');% current point of the current figure (gcbo)1867 hchild=get(hObject,'Children');%handles of all objects in the current figure1868 %% loop on all the objects in the current figure (selected by the last mouse click)1869 1870 for ichild=1:length(hchild)1871 obj_pos=get(hchild(ichild),'Position');%position of the object1872 if numel(obj_pos)>=4 && xy_fig(1) >=obj_pos(1) && xy_fig(2) >= obj_pos(2)&& xy_fig(1) <=obj_pos(1)+obj_pos(3) && xy_fig(2) <= obj_pos(2)+obj_pos(4);1873 htype=get(hchild(ichild),'Type');%type of object child of the current figure1874 %if the mouse is over an axis, look at the data1875 if isequal(htype,'uicontrol') && isequal(get(hchild(ichild),'Visible'),'on')1876 msg_pos(1:2)=series_pos(1:2)+obj_pos(1:2).*series_pos(3:4);1877 msgbox_uvmat(['uicontrol: ' get(hchild(ichild),'Tag')],'',get(hchild(ichild),'String'),msg_pos)1878 break1879 end1880 end1881 end1882 set(hObject,'Units','pixels')1883 end1884 1860 1885 1861 %%%%%%%%%%%%%
Note: See TracChangeset
for help on using the changeset viewer.