Index: trunk/src/uvmat.m
===================================================================
--- trunk/src/uvmat.m	(revision 686)
+++ trunk/src/uvmat.m	(revision 688)
@@ -696,5 +696,9 @@
 
 if strcmp(FileType,'txt')
-    edit(fileinput)
+    try
+        edit(fileinput)
+    catch ME
+        msgbox_uvmat('ERROR','invalid intput file')
+    end
     return
 elseif strcmp(FileType,'xml')
@@ -922,12 +926,16 @@
     drawnow
     [XmlDataRead,warntext]=imadoc2struct(XmlFileName);
+    if ~isempty(warntext)
+        msgbox_uvmat('WARNING',warntext)
+    end
     if ~isempty(XmlDataRead)
-        ImaDoc_str=['view ' DocExt];  % DocExt= '.xml' or .civ (obsolete case)    
-            if isfield(XmlDataRead,'TimeUnit')&& ~isempty(XmlDataRead.TimeUnit)
-                TimeUnit=XmlDataRead.TimeUnit;
-            end
-                    if isfield(XmlDataRead,'Time')&& ~isempty(XmlDataRead.Time)
-                XmlData.Time=XmlDataRead.TimeUnit;
-            end
+        ImaDoc_str=['view ' DocExt];  % DocExt= '.xml' or .civ (obsolete case)
+        %XmlData=XmlDataRead;
+        if isfield(XmlDataRead,'TimeUnit')&& ~isempty(XmlDataRead.TimeUnit)
+            TimeUnit=XmlDataRead.TimeUnit;
+        end
+        if isfield(XmlDataRead,'Time')&& ~isempty(XmlDataRead.Time)
+            XmlData.Time=XmlDataRead.Time;
+        end
         set(handles.view_xml,'BackgroundColor',[1 1 1])% paint back to white
         drawnow
@@ -937,5 +945,5 @@
                 set (handles.slices,'String','volume')
             end
-            % check whether the GUI geometry_calib is opened 
+            % check whether the GUI geometry_calib is opened
             hgeometry_calib=findobj('tag','geometry_calib');
             if ~isempty(hgeometry_calib) % check whether the display of the GUI geometry_calib is consistent with the current calib param
@@ -1046,5 +1054,5 @@
 if ~isempty(TimeUnit)
     if index==2 && isfield(UvData,'TimeUnit') && ~strcmp(UvData.TimeUnit,TimeUnit)
-        warntext=['time unit for second file series ' TimeUnit ' inconsistent with first series'];
+        msgbox_uvmat('WARNING',['time unit for second file series ' TimeUnit ' inconsistent with first series'])
     else
         UvData.TimeUnit=TimeUnit;
@@ -1055,5 +1063,5 @@
 
 %display warning message
-if ~isempty(warntext)
+if ~isequal(warntext,'')
     msgbox_uvmat('WARNING',warntext);
 end
@@ -3775,10 +3783,15 @@
 %-------------------------------------------------------------------
 val=get(handles.ListContour,'Value');
-if val==2
+if val==2% option 'contours'
     set(handles.interval_txt,'Visible','on')
     set(handles.num_IncrA,'Visible','on')
-else
+    set(handles.num_IncrA,'String','')% refresh contour interval
+%     set(handles.opacity_txt,'Visible','off')
+%     set(handles.num_Opacity,'Visible','off')
+else % option 'image'
     set(handles.interval_txt,'Visible','off')
     set(handles.num_IncrA,'Visible','off')
+%     set(handles.opacity_txt,'Visible','on')
+%     set(handles.num_Opacity,'Visible','on')
 end
 update_plot(handles);
@@ -3813,11 +3826,6 @@
 function CheckFixVectors_Callback(hObject, eventdata, handles)
 %-------------------------------------------------------------------
-test=get(handles.CheckFixVectors,'Value');
-if test
-%     set(handles.CheckFixVectors,'BackgroundColor',[1 1 0])
-else
+if ~get(handles.CheckFixVectors,'Value')
     update_plot(handles);
-    %set(handles.num_VecScale,'String',num2str(ScalOut.num_VecScale,3))
-%     set(handles.CheckFixVectors,'BackgroundColor',[0.7 0.7 0.7])
 end
 
@@ -4024,4 +4032,6 @@
 function update_plot(handles)
 %-------------------------------------------------------------------
+set(handles.run0,'BackgroundColor',[1 1 0]);% indicate plot activity by yellow color
+drawnow
 UvData=get(handles.uvmat,'UserData');
 AxeData=UvData.PlotAxes;% retrieve the current plotted data
@@ -4029,8 +4039,13 @@
 [tild,PlotParamOut]= plot_field(AxeData,handles.PlotAxes,PlotParam);
 errormsg=fill_GUI(PlotParamOut,handles.uvmat);
-RUNColor=get(handles.run0,'BackgroundColor');% 
-if isequal(RUNColor,[1 0 1])% suppress magenta color (indicate that plot is  updated)
-    set(handles.run0,'BackgroundColor',[1 0 0]);
-end
+if ~isempty(errormsg)
+    msgbox_uvmat('ERROR',errormsg)
+    return
+end
+% RUNColor=get(handles.run0,'BackgroundColor');% 
+% if isequal(RUNColor,[1 0 1])% suppress magenta color (indicate that plot is  updated)
+%     set(handles.run0,'BackgroundColor',[1 0 0]);
+% end
+set(handles.run0,'BackgroundColor',[1 0 0]);
 
 %------------------------------------------------------------------------
