Index: /trunk/src/geometry_calib.m
===================================================================
--- /trunk/src/geometry_calib.m	(revision 679)
+++ /trunk/src/geometry_calib.m	(revision 680)
@@ -1320,5 +1320,4 @@
 %------------------------------------------------------------------------ 
 function ListCoord_CellSelectionCallback(hObject, eventdata, handles)
-
 if ~isempty(eventdata.Indices)
     iline=eventdata.Indices(1);% selected line number
@@ -1350,9 +1349,9 @@
 function key_press_fcn(hObject,eventdata,handles)
 
-xx=double(get(handles.geometry_calib,'CurrentCharacter')); %get the keyboard character
+xx=double(get(handles.geometry_calib,'CurrentCharacter'));%get the keyboard character
 %if ismember(xx,[8 127])%backspace or delete
-if ismember(xx,[30 31 8 127])% arrow upward, downward, backspace or delete
+if ismember(xx,[30 31 127])% arrow upward, downward, or delete
     Coord=get(handles.ListCoord,'Data');
-    ind=find(Coord(:,6));
+    ind=find(Coord(:,6));%find the marker '+' for line selection
     Coord(:,6)=zeros(size(Coord,1),1);% desactivate the current line mark
     switch xx
@@ -1361,9 +1360,9 @@
         case 31% arrow downward
             Coord(ind+1,6)=1;
-        case {8 127}% remove line
+        case 127% remove line
             Coord(ind,:)=[];
+            PLOT_Callback(hObject,eventdata,handles)
     end
     set(handles.ListCoord,'Data',Coord);
-    PLOT_Callback(hObject,eventdata,handles)
 end
 
Index: /trunk/src/mouse_down.m
===================================================================
--- /trunk/src/mouse_down.m	(revision 679)
+++ /trunk/src/mouse_down.m	(revision 680)
@@ -62,5 +62,5 @@
     hset_object=findobj(allchild(0),'Name','set_object');
     if ~isempty(hset_object)
-        hPLOT=findobj(hset_object,'tag','PLOT');
+        hPLOT=findobj(hset_object,'tag','REFRESH');
         test_create=strcmp(get(hPLOT,'enable'),'on') &&~get(hhuvmat.CheckEditObject,'Value');% create new object if set_object is in mode enable and uvmat not in mode 'EditObject'
     end
@@ -285,12 +285,5 @@
                     %indicate on the list of the GUI uvmat which object has been selected
             if strcmp(get(hCurrentGUI,'tag'),'uvmat') %if the uvmat graph has been selected, object projection is on the other frame view_field
-%                 IndexObj=get(hhuvmat.ListObject,'Value');
-%                 if IndexObj>IndexObj_old(1)
-%                     IndexObj=[IndexObj_old(1) IndexObj];
-%                 else
-%                     IndexObj=[1 IndexObj];
-%                 end
                 set(hhuvmat.ListObject,'Value',IndexObj);
-%                 set(hhuvmat.ListObject,'UserData',IndexObj);
             else
                 set(hhuvmat.ListObject_1,'Value',IndexObj);
@@ -298,8 +291,4 @@
                 UvData.ProjObject{IndexObj}.Name=list_str{IndexObj};
             end
-%             h_set_object=findobj(allchild(0),'Tag','set_object');
-%             if ~isempty(h_set_object)
-%                 delete(h_set_object)
-%             end
             set_object(UvData.ProjObject{IndexObj})
             axes(hchild);%set back the current axes haxes
Index: /trunk/src/plot_object.m
===================================================================
--- /trunk/src/plot_object.m	(revision 679)
+++ /trunk/src/plot_object.m	(revision 680)
@@ -410,8 +410,10 @@
         end      
     else% no patch image requested, erase existing ones
+        if isfield(PlotData,'SubObject')
         for iobj=1:length(PlotData.SubObject)
             if ishandle(PlotData.SubObject(iobj)) && strcmp(get(PlotData.SubObject(iobj),'Type'),'image')
                 delete(PlotData.SubObject(iobj))
             end
+        end
         end
     end
@@ -467,5 +469,5 @@
             hh=rectangle('Position',[ObjectData.Coord(1,1)-XMax ObjectData.Coord(1,2)-YMax 2*XMax 2*YMax],'LineWidth',2,'EdgeColor',col);
         case 'ellipse'
-            hh=rectangle('Curvature',[1 1],'Position',[ObjectData.Coord(1,1)-XMax ObjectData.Coord(1,2)-YMax 2*XMax 2*YMax],'EdgeColor',col);
+            hh=rectangle('Curvature',[1 1],'Position',[ObjectData.Coord(1,1)-XMax ObjectData.Coord(1,2)-YMax 2*XMax 2*YMax],'EdgeColor',col,'LineWidth',2);
         otherwise
             msgbox_uvmat('ERROR','unknown ObjectData.Type in plot_object.m')
Index: /trunk/src/set_object.m
===================================================================
--- /trunk/src/set_object.m	(revision 679)
+++ /trunk/src/set_object.m	(revision 680)
@@ -36,7 +36,7 @@
 function varargout = set_object(varargin)
 
-% Last Modified by GUIDE v2.5 26-Jan-2012 22:00:47
-
-% Begin initialization code - DO NOT PLOT
+% Last Modified by GUIDE v2.5 28-Aug-2013 20:41:02
+
+% Begin initialization code - DO NOT REFRESH
 gui_Singleton = 1;
 gui_State = struct('gui_Name',       mfilename, ...
@@ -55,5 +55,5 @@
     gui_mainfcn(gui_State, varargin{:});
 end
-% End initialization code - DO NOT PLOT
+% End initialization code - DO NOT REFRESH
 %------------------------------------------------------------------------
 %------------------------------------------------------------------------
@@ -63,5 +63,5 @@
 %'IndexObj': NON USED ANYMORE (To suppress) index of the object (on the UvData list) that set_object will modify
 %        if =[] or absent: index still undefined (create mode in uvmat)
-%        if=0; no associated object (used for series), the button 'PLOT' is  then unvisible
+%        if=0; no associated object (used for series), the button 'REFRESH' is  then unvisible
 %'data': read from an existing object selected in the interface
 %      .Name : class of object ('POINTS','LINE',....)
@@ -70,5 +70,5 @@
 %      .ParentButton: handle of the uicontrol object calling the interface
 % PlotHandles: set of handles of the elements contolling the plotting of the projected field:
-%  if =[] or absent, no plot (mask mode in uvmat)
+%  if =[] or absent, no refresh (mask mode in uvmat)
 % parameters on the uvmat interface (obtained by 'get_plot_handle.m')
 function set_object_OpeningFcn(hObject, eventdata, handles, data, PlotHandles,ZBounds)
@@ -164,5 +164,5 @@
 set(get(handles.set_object,'children'),'enable','off')
 set(handles.SAVE,'enable','on')
-% set(handles.PLOT,'enable','off') 
+% set(handles.REFRESH,'enable','off') 
 
 
@@ -415,8 +415,9 @@
 
 %------------------------------------------------------------------------
-% --- Executes on button press in PLOT: refresh the current object , plot the object and its projected field
-function PLOT_Callback(hObject, eventdata, handles)
-
-set(handles.PLOT,'BackgroundColor',[1 1 0])
+% --- Executes on button press in REFRESH: refresh the current object , refresh the object and its projected field
+%------------------------------------------------------------------------
+function REFRESH_Callback(hObject, eventdata, handles)
+
+set(handles.REFRESH,'BackgroundColor',[1 1 0])
 drawnow
 
@@ -429,5 +430,5 @@
     set(hseries,'UserData',SeriesData);
     end
-    set(handles.PLOT,'BackgroundColor',[1 0 0])
+    set(handles.REFRESH,'BackgroundColor',[1 0 0])
     return
 end
@@ -504,5 +505,5 @@
 end
 
-%% plot the field projected on the object
+%% refresh the field projected on the object
 hview_field=[];%default
 IndexObj_1=get(hhuvmat.ListObject_1,'Value');
@@ -516,5 +517,5 @@
         if ~isempty(errormsg)
             msgbox_uvmat('ERROR', ['set_object/tps_coeff_field/' errormsg])
-            set(handles.PLOT,'enable','on')
+            set(handles.REFRESH,'enable','on')
             return
         end
@@ -523,5 +524,5 @@
     if ~isempty(errormsg)
         msgbox_uvmat('ERROR', ['set_object/proj_field/' errormsg])
-        set(handles.PLOT,'enable','on')
+        set(handles.REFRESH,'enable','on')
         return
     end
@@ -557,5 +558,5 @@
 end
 
-%% update the object plot 
+%% update the object refresh 
 hobject=UvData.ProjObject{IndexObj}.DisplayHandle.uvmat;
 % if we are editing the object used for projection in uvmat
@@ -570,5 +571,5 @@
     UvData.ProjObject{IndexObj}.DisplayHandle.uvmat=...
              plot_object(UvData.ProjObject{IndexObj},UvData.ProjObject{IndexObj_1},UvData.ProjObject{IndexObj}.DisplayHandle.uvmat,'m');
-    %indicate the object index in the user data of the object plot (needed for further mouse editing)
+    %indicate the object index in the user data of the object refresh (needed for further mouse editing)
     ObjectInfo=get(UvData.ProjObject{IndexObj}.DisplayHandle.uvmat,'UserData');
     ObjectInfo.IndexObj=IndexObj;
@@ -587,5 +588,5 @@
 set(hhuvmat.CheckEditObject,'Value',1) % set uvmat to object edit mode to allow further object update
 set(hhuvmat.CheckViewField,'Value',1)
-set(handles.PLOT,'BackgroundColor',[1 0 0])
+set(handles.REFRESH,'BackgroundColor',[1 0 0])
 %------------------------------------------------------------------------
 % --- Executes on button press in MenuCoord.
@@ -691,5 +692,5 @@
 
 % update graph
-PLOT_Callback(hObject, eventdata, handles)
+REFRESH_Callback(hObject, eventdata, handles)
 
 %------------------------------------------------------------------------
@@ -719,25 +720,26 @@
 function Coord_CellEditCallback(hObject, eventdata, handles)
 %------------------------------------------------------------------------
-ListType=get(handles.Type,'String');
-Type=ListType{get(handles.Type,'Value')};
-switch Type
-    % add lines if multi line input needed
-    case{'points','polyline','polygon'}
-        Input=str2num(eventdata.EditData);%pasted input
-        Coord=get(handles.Coord,'Data');
-        iline=eventdata.Indices(1);% selected line number
-        if size(Coord,1)<iline+numel(Input)
-            Coord=[Coord ; zeros(iline+numel(Input)-size(Coord,1),size(Coord,2))];% append zeros to fit the new column
-        end
-        Coord(iline:iline+numel(Input)-1,eventdata.Indices(2))=Input';
-        set(handles.Coord,'Data',Coord)
-end
-
+% ListType=get(handles.Type,'String');
+% Type=ListType{get(handles.Type,'Value')};
+% switch Type
+%     % add lines if multi line input needed
+%     case{'points','polyline','polygon'}
+%         Input=str2num(eventdata.EditData);%pasted input
+%         Coord=get(handles.Coord,'Data');
+%         iline=eventdata.Indices(1);% selected line number
+%         if size(Coord,1)<iline+numel(Input)
+%             Coord=[Coord ; zeros(iline+numel(Input)-size(Coord,1),size(Coord,2))];% append zeros to fit the new column
+%         end
+%         Coord(iline:iline+numel(Input)-1,eventdata.Indices(2))=Input';
+%         set(handles.Coord,'Data',Coord)
+% end
+%------------------------------------------------------------------------
 % --- Executes when selected cell(s) is changed in ListCoord.
+%------------------------------------------------------------------------
 function Coord_CellSelectionCallback(hObject, eventdata, handles)
 
 if ~isempty(eventdata.Indices)
     iline=eventdata.Indices(1);% selected line number
-    set(handles.Coord,'UserData',iline)
+    set(handles.Coord,'UserData',iline)% used possibly for line deletion or table extension, using key_press_fcn
 end
 
@@ -748,5 +750,5 @@
 
 xx=double(get(handles.set_object,'CurrentCharacter')); %get the keyboard character
-if ismember(xx,[8 127 31])%backspace or delete, or downward
+if ismember(xx,[127 31])% delete, or downward
     Coord=get(handles.Coord,'Data');
     iline=get(handles.Coord,'UserData');
Index: /trunk/src/uvmat.m
===================================================================
--- /trunk/src/uvmat.m	(revision 679)
+++ /trunk/src/uvmat.m	(revision 680)
@@ -4715,5 +4715,5 @@
 if check_plot
     hhset_object=guidata(hset_object);
-    set_object('PLOT_Callback',1,[],hhset_object);% call the GUI set_object 
+    set_object('REFRESH_Callback',1,[],hhset_object);% call the GUI set_object 
 end
 
@@ -4721,5 +4721,5 @@
 function MenuBrowseObject_Callback(hObject, eventdata, handles)
 %------------------------------------------------------------------------
-%get the object file 
+%get the object file
 fileinput=uigetfile_uvmat('pick an xml object file:',get(handles.RootPath,'String'),'.xml');
 if ~isempty(fileinput)
@@ -4729,13 +4729,7 @@
         msgbox_uvmat('WARNING','The xml file does not have the heading ProjObject for projection objects')
     end
-   % [tild,data.Name]=fileparts(fileinput);% object name set as file name
     ListObject=get(handles.ListObject,'String');
-    
-%     if ~strcmp(ListObject{end},'')
-%         ListObject=[ListObject;{''}]; %append a blank to the list (if not already done) to indicate the creation of a new object
-%         set(handles.ListObject,'String',ListObject)
-%     end
-ListObject=[ListObject;{data.Name}];
-    IndexObj=length(ListObject);  
+    ListObject=[ListObject;{data.Name}];
+    IndexObj=length(ListObject);
     UvData=get(handles.uvmat,'UserData');
     UvData.ProjObject{IndexObj}=[]; %create a new empty object
@@ -4743,32 +4737,13 @@
     UvData.ProjObject{IndexObj}.DisplayHandle.view_field=[]; %no plot handle before plot_field operation
     set(handles.uvmat,'UserData',UvData)
-%     set(handles.ListObject,'String',ListObject)
-%     set(handles.ListObject,'Value',IndexObj)
     set(handles.CheckViewObject,'Value',1)
     set(handles.CheckViewField,'Value',1)
     hset_object=set_object(data);% call the set_object interface
     hhset_object=guidata(hset_object);
-    set_object('PLOT_Callback',hObject,eventdata,hhset_object);% plot projection
-    %set(get(hset_object,'children'),'enable','on')% enable edit action on elements on GUI set_object
+    set_object('REFRESH_Callback',hObject,eventdata,hhset_object);% plot projection
     set(handles.CheckEditObject,'Value',0); %suppress the object edit mode
     CheckEditObject_Callback([],[],handles)
     set(handles.DeleteObject,'Visible','on')
 end
-
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% % MenuEdit Callbacks
-% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %------------------------------------------------------------------------
-% function MenuEditObject_Callback(hObject, eventdata, handles)
-% %------------------------------------------------------------------------
-% set(handles.CheckEditObject,'Value',1)
-% edit_Callback(hObject, eventdata, handles)
-% 
-% %------------------------------------------------------------------------
-% function MenuEditVectors_Callback(hObject, eventdata, handles)
-% %------------------------------------------------------------------------
-% set(handles.edit_vect,'Visible','on')
-% set(handles.edit_vect,'Value',1)
-% edit_vect_Callback(hObject, eventdata, handles)
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
