Index: /trunk/src/activate.m
===================================================================
--- /trunk/src/activate.m	(revision 659)
+++ /trunk/src/activate.m	(revision 660)
@@ -71,7 +71,9 @@
         pause(0.2)
     end
-    if strcmp(get(hObject,'Style'),'axes')
+    if strcmp(get(hObject,'Type'),'axes')
         mouse_down(hFig,[])
+        pause(2)
         mouse_up(hFig,[])
+        drawnow
     else
     BackgroundColor=get(hObject,'BackgroundColor');
Index: /trunk/src/check_files.m
===================================================================
--- /trunk/src/check_files.m	(revision 659)
+++ /trunk/src/check_files.m	(revision 660)
@@ -192,16 +192,16 @@
 
 %% check dates of compilation
-currentdir=pwd;
-cd(pathuvmat)
-list_compile=dir('*.sh');
-for ilist=1:numel(list_compile)
-    mfile=regexprep(list_compile(ilist).name,'.sh$','.m');
-    if exist(mfile,'file')
-        datfile=dir(mfile);
-        if ~isempty(datfile) && isfield(datfile,'datenum') && datfile.datenum>list_compile(ilist).datenum
-            checkmsg=[checkmsg;{[list_compile(ilist).name ' needs to be updated by compile_functions']}];
-        end
-    end
-end
-cd(currentdir)
-
+% currentdir=pwd;
+% cd(pathuvmat)
+% list_compile=dir('*.sh');
+% for ilist=1:numel(list_compile)
+%     mfile=regexprep(list_compile(ilist).name,'.sh$','.m');
+%     if exist(mfile,'file')
+%         datfile=dir(mfile);
+%         if ~isempty(datfile) && isfield(datfile,'datenum') && datfile.datenum>list_compile(ilist).datenum
+%             checkmsg=[checkmsg;{[list_compile(ilist).name ' needs to be updated by compile_functions']}];
+%         end
+%     end
+% end
+% cd(currentdir)
+
Index: /trunk/src/demo_uvmat.m
===================================================================
--- /trunk/src/demo_uvmat.m	(revision 659)
+++ /trunk/src/demo_uvmat.m	(revision 660)
@@ -4,5 +4,5 @@
 % brigtness
 huvmat=findobj(allchild(0),'Tag','uvmat');
-figure(huvmat)
+uistack(huvmat,'top')
 activate('uvmat','Scalar','num_MaxA',[],100)
 activate('uvmat','Scalar','CheckFixScalar',[],0)
Index: /trunk/src/geometry_calib.m
===================================================================
--- /trunk/src/geometry_calib.m	(revision 659)
+++ /trunk/src/geometry_calib.m	(revision 660)
@@ -50,5 +50,5 @@
 % Edit the above text to modify the response to help geometry_calib
 
-% Last Modified by GUIDE v2.5 03-Jul-2013 09:23:35
+% Last Modified by GUIDE v2.5 05-Jul-2013 08:29:07
 
 % Begin initialization code - DO NOT edit
@@ -480,5 +480,5 @@
 huvmat=findobj(allchild(0),'Tag','uvmat');
 hhuvmat=guidata(huvmat);
-coord_files=get(handles.coord_files,'String');
+coord_files=get(handles.ListCoordFiles,'String');
 if ischar(coord_files)
     coord_files={coord_files};
@@ -487,5 +487,5 @@
     coord_files={};
 end
-%retrieve the calibration points stored in the files listed in the popup list coord_files
+%retrieve the calibration points stored in the files listed in the popup list ListCoordFiles
 x_1=Coord(:,4:5)';%px coordinates of the ref points
 nx=str2num(get(hhuvmat.num_Npx,'String'));
@@ -551,5 +551,5 @@
 hhuvmat=guidata(huvmat);
 % check_cond=0;
-coord_files=get(handles.coord_files,'String');
+coord_files=get(handles.ListCoordFiles,'String');
 if ischar(coord_files)
     coord_files={coord_files};
@@ -559,5 +559,5 @@
 end
 
-%retrieve the calibration points stored in the files listed in the popup list coord_files
+%retrieve the calibration points stored in the files listed in the popup list ListCoordFiles
 x_1=Coord(:,4:5)';%px coordinates of the ref points
 nx=str2num(get(hhuvmat.num_Npx,'String'));
@@ -737,5 +737,5 @@
         msgbox_uvmat('ERROR',errormsg);
     end
-    listfile=get(handles.coord_files,'string');
+    listfile=get(handles.ListCoordFiles,'string');
     if isequal(listfile,{''})
         listfile={outputfile};
@@ -743,5 +743,5 @@
         listfile=[listfile;{outputfile}];%update the list of coord files
     end
-    set(handles.coord_files,'string',listfile);
+    set(handles.ListCoordFiles,'string',listfile);
 end
 % set(handles.ListCoord,'Value',1)% refresh the display of coordinates
@@ -762,6 +762,6 @@
 function CLEAR_Callback(hObject, eventdata, handles)
 %------------------------------------------------------------------------
-set(handles.coord_files,'Value',1)
-set(handles.coord_files,'String',{''})
+set(handles.ListCoordFiles,'Value',1)
+set(handles.ListCoordFiles,'String',{''})
 
 %------------------------------------------------------------------------
@@ -811,10 +811,10 @@
 
 %------------------------------------------------------------------------
-% --- Executes on selection change in edit_append.
-function edit_append_Callback(hObject, eventdata, handles)
-%------------------------------------------------------------------------
-choice=get(handles.edit_append,'Value');
+% --- Executes on selection change in CheckEnableMouse.
+function CheckEnableMouse_Callback(hObject, eventdata, handles)
+%------------------------------------------------------------------------
+choice=get(handles.CheckEnableMouse,'Value');
 if choice
-    set(handles.edit_append,'BackgroundColor',[1 1 0])
+    set(handles.CheckEnableMouse,'BackgroundColor',[1 1 0])
     huvmat=findobj(allchild(0),'tag','uvmat');
     if ishandle(huvmat)
@@ -826,5 +826,5 @@
     end
 else
-    set(handles.edit_append,'BackgroundColor',[0.7 0.7 0.7]) 
+    set(handles.CheckEnableMouse,'BackgroundColor',[0.7 0.7 0.7]) 
 end
     
@@ -918,26 +918,13 @@
 
 %grid in phys space
-Coord=get(handles.ListCoord,'String');
-val=get(handles.ListCoord,'Value');
-data=read_geometry_calib(Coord);
-%nbpoints=size(data.Coord,1); %nbre of calibration points
-data.Coord(val:val+size(T,1)-1,1:3)=T(end:-1:1,:);%update the existing list of phys coordinates from the GUI create_grid
-% for i=1:nbpoints
-%    for j=1:5
+Coord=get(handles.ListCoord,'Data');
+Coord(1:size(T,1),1:3)=T;%update the existing list of phys coordinates from the GUI create_grid
+
+% for i=1:size(data.Coord,1)
+%     for j=1:5
 %           Coord{i,j}=num2str(data.Coord(i,j),4);%display coordiantes with 4 digits
-%    end
+%     end
 % end
-%update the phys coordinates starting from the selected point (down in the
-Coord(end,:)=[]; %remove last string '.....'
-for i=1:size(data.Coord,1)
-    for j=1:5
-          Coord{i,j}=num2str(data.Coord(i,j),4);%display coordiantes with 4 digits
-    end
-end
-
-%size(data.Coord,1)
-Tabchar=cell2tab(Coord,' | ');
-Tabchar=[Tabchar ;{'......'}];
-set(handles.ListCoord,'String',Tabchar)
+set(handles.ListCoord,'Data',Coord)
 
 % -----------------------------------------------------------------------
@@ -946,13 +933,12 @@
 %------------------------------------------------------------------------
 %% read the four last point coordinates in pixels
-Coord_cell=get(handles.ListCoord,'String');%read list of coordinates on geometry_calib
-data=read_geometry_calib(Coord_cell);
-nbpoints=size(data.Coord,1); %nbre of calibration points
+Coord=get(handles.ListCoord,'Data');%read list of coordinates on geometry_calib
+nbpoints=size(Coord,1); %nbre of calibration points
 if nbpoints~=4
     msgbox_uvmat('ERROR','four points must have be selected by the mouse to delimitate the phys grid area; the Ox axis will be defined by the two first points')
     return
 end
-corners_X=(data.Coord(end:-1:end-3,4)); %pixel absissa of the four corners
-corners_Y=(data.Coord(end:-1:end-3,5)); 
+corners_X=(Coord(end:-1:end-3,4)); %pixel absissa of the four corners
+corners_Y=(Coord(end:-1:end-3,5)); 
 
 %reorder the last two points (the two first in the list) if needed
@@ -1064,15 +1050,17 @@
 Tmod=T(:,(1:2))+Delta;
 [Xpx,Ypx]=px_XYZ(GeometryCalib,Tmod(:,1),Tmod(:,2));
-for ipoint=1:nbpoints
-     Coord{ipoint,1}=num2str(T(ipoint,1),4);%display coordiantes with 4 digits
-     Coord{ipoint,2}=num2str(T(ipoint,2),4);%display coordiantes with 4 digits
-     Coord{ipoint,3}=num2str(T(ipoint,3),4);%display coordiantes with 4 digits;
-     Coord{ipoint,4}=num2str(Xpx(ipoint),4);%display coordiantes with 4 digits
-     Coord{ipoint,5}=num2str(Ypx(ipoint),4);%display coordiantes with 4 digits
-end
-Tabchar=cell2tab(Coord(end:-1:1,:),' | ');
-Tabchar=[Tabchar ;{'......'}];
-set(handles.ListCoord,'Value',1)
-set(handles.ListCoord,'String',Tabchar)
+% for ipoint=1:nbpoints
+%      Coord{ipoint,1}=num2str(T(ipoint,1),4);%display coordiantes with 4 digits
+%      Coord{ipoint,2}=num2str(T(ipoint,2),4);%display coordiantes with 4 digits
+%      Coord{ipoint,3}=num2str(T(ipoint,3),4);%display coordiantes with 4 digits;
+%      Coord{ipoint,4}=num2str(Xpx(ipoint),4);%display coordiantes with 4 digits
+%      Coord{ipoint,5}=num2str(Ypx(ipoint),4);%display coordiantes with 4 digits
+% end
+Coord=[T Xpx Ypx zeros(size(T,1),1)];
+set(handles.ListCoord,'Data',Coord)
+% Tabchar=cell2tab(Coord(end:-1:1,:),' | ');
+% Tabchar=[Tabchar ;{'......'}];
+% set(handles.ListCoord,'Value',1)
+% set(handles.ListCoord,'String',Tabchar)
 PLOT_Callback(hObject, eventdata, handles)
 
@@ -1197,5 +1185,5 @@
 % -----------------------------------------------------------------------
 inputfile=browse_xml(hObject, eventdata, handles);
-listfile=get(handles.coord_files,'string');
+listfile=get(handles.ListCoordFiles,'string');
 if isequal(listfile,{''})
     listfile={inputfile};
@@ -1203,5 +1191,5 @@
     listfile=[listfile;{inputfile}];%update the list of coord files
 end
-set(handles.coord_files,'string',listfile);
+set(handles.ListCoordFiles,'string',listfile);
 
 %------------------------------------------------------------------------
@@ -1308,9 +1296,9 @@
 
 if isempty(CoordCell)% allow mouse action by default in the absence of input points
-    set(handles.edit_append,'Value',1)
-    set(handles.edit_append,'BackgroundColor',[1 1 0])
+    set(handles.CheckEnableMouse,'Value',1)
+    set(handles.CheckEnableMouse,'BackgroundColor',[1 1 0])
 else % does not allow mouse action by default in the presence of input points
-    set(handles.edit_append,'Value',0)
-    set(handles.edit_append,'BackgroundColor',[0.7 0.7 0.7])
+    set(handles.CheckEnableMouse,'Value',0)
+    set(handles.CheckEnableMouse,'BackgroundColor',[0.7 0.7 0.7])
 end
 
@@ -1478,2 +1466,9 @@
     set(hhh,'Position',[XCoord-ind_range/2 YCoord-ind_range/2 ind_range ind_range])
 end
+
+
+% --- Executes on button press in Copy.
+function Copy_Callback(hObject, eventdata, handles)
+% hObject    handle to Copy (see GCBO)
+% eventdata  reserved - to be defined in a future version of MATLAB
+% handles    structure with handles and user data (see GUIDATA)
Index: /trunk/src/mouse_down.m
===================================================================
--- /trunk/src/mouse_down.m	(revision 659)
+++ /trunk/src/mouse_down.m	(revision 660)
@@ -74,5 +74,5 @@
         else
             hh_calib=guidata(h_calib);
-            test_cal=get(hh_calib.edit_append,'Value');
+            test_cal=get(hh_calib.CheckEnableMouse,'Value');
         end
     end
@@ -403,6 +403,6 @@
     h_geometry_calib=findobj(allchild(0),'Name','geometry_calib'); %find the geomterty_calib GUI
     hh_geometry_calib=guidata(h_geometry_calib);
-    h_edit_append=hh_geometry_calib.edit_append;%findobj(h_geometry_calib,'Tag','edit_append');
-    if isequal(get(h_edit_append,'Value'),1) && ~isempty(haxes)
+    h_CheckEnableMouse=hh_geometry_calib.CheckEnableMouse;
+    if isequal(get(h_CheckEnableMouse,'Value'),1) && ~isempty(haxes)
         if ~isequal(get(hhuvmat.TransformName,'Value'),1); %active only with no transform (px coordinates)
             set(hhuvmat.TransformName,'Value',1)
Index: /trunk/src/mouse_motion.m
===================================================================
--- /trunk/src/mouse_motion.m	(revision 659)
+++ /trunk/src/mouse_motion.m	(revision 660)
@@ -397,5 +397,5 @@
                 end
                 hh=findobj('Tag','calib_points');%look for handle of calibration points
-               if ~isempty(hh) && ~isempty(get(hh,'UserData')) && get(hh_geometry_calib.edit_append,'Value') 
+               if ~isempty(hh) && ~isempty(get(hh,'UserData')) && get(hh_geometry_calib.CheckEnableMouse,'Value') 
                    %set(hh,'UserData',index_point)
                     index_point=get(hh,'UserData');
Index: /trunk/src/mouse_up.m
===================================================================
--- /trunk/src/mouse_up.m	(revision 659)
+++ /trunk/src/mouse_up.m	(revision 660)
@@ -333,5 +333,5 @@
     if ~isempty(h_geometry_calib)
         hh_geometry_calib=guidata(h_geometry_calib);
-        edit_test=get(hh_geometry_calib.edit_append,'Value');
+        edit_test=get(hh_geometry_calib.CheckEnableMouse,'Value');
         hh=findobj(hcurrentaxes,'tag','calib_points');%look for handle of calibration points
         if ~isempty(hh) && edit_test
Index: /trunk/src/uvmat.m
===================================================================
--- /trunk/src/uvmat.m	(revision 659)
+++ /trunk/src/uvmat.m	(revision 660)
@@ -4321,5 +4321,5 @@
     if ishandle(hgeometry_calib)
         hhgeometry_calib=guidata(hgeometry_calib);
-        set(hhgeometry_calib.edit_append,'Value',0)% desactivate mouse action in geometry_calib
+        set(hhgeometry_calib.CheckEnableMouse,'Value',0)% desactivate mouse action in geometry_calib
     end
     set(handles.CheckViewObject,'value',1)
@@ -4781,5 +4781,5 @@
 if ishandle(hgeometry_calib)
     hhgeometry_calib=guidata(hgeometry_calib);
-    set(hhgeometry_calib.edit_append,'Value',0)% desactivate mouse action in geometry_calib
+    set(hhgeometry_calib.CheckEnableMouse,'Value',0)% desactivate mouse action in geometry_calib
 end
 set(handles.CheckEditObject,'Value',0)  %desactivate the object edit mode
